You are not logged in.
My code:
var
vparam: array of Tvarrec;
...
// How can I build vparam ? the value form anther array (string array )
ConnectionProperties.Execute(aSQL, vparam)
...
Last edited by 畅雨 (2014-05-27 06:26:16)
Offline
I do not know the number of parameters,Only know the number of parameters when running... Need to dynamically create parameters
Offline
You can try to define an array of TVarRec and set each value using VariantToVarRec() from SynCommons.pas.
But I'm afraid it won't work with SynDB classes, since TSQLDBStatement.Bind() does not support variant kind of parameters (yet)!
The easiest is to bind all values one by one, using regular ISQLDBStatement.Bind() for each parameter.
Online
thanks,
Offline