Function Command.bindParameters
Bind a Variant[] as the parameters of a prepared statement.
You can use this method to bind a set of variables in Variant form to the parameters of a prepared statement.
Parameter specializations can be added if required. This method could be used to add records from a data entry form along the lines of
auto c = Command(con, "insert into table42 values(?, ?, ?)");
c .prepare();
Variant[] va;
va .length = 3;
DataRecord dr; // Some data input facility
ulong ra;
do
{
dr .get();
va[0] = dr("Name");
va[1] = dr("City");
va[2] = dr("Whatever");
c .bindParameters(va);
c .execPrepared(ra);
} while(tod < "17:30");
Prototype
deprecated void bindParameters(
std .variant .VariantN!(32L)[] va,
ParameterSpecialization[] psnList = null
);
Parameters
Name | Description |
---|---|
va | External list of Variants to be used as parameters |
psnList | any required specializations |