Are the values :v1, v2, etc like that, as in do I type that and they get filled in by the params loop later on? Will have to play and learn.
Yes.
To be exact this line...
qr1.params[tj-1].AsString := stringgrid1.cells[ti, tj];
.. uses
params[x].AsString :=
to set the parameter value (by using an index to the paramerlist, e.g. tj-1).
That also means that it really doesn't matter
how you name the parameters as they are not set by using params.ParamByName('NameOfParameter').AsString.
You would have to make sure the parameter names in the query are unique though