Where is FireDAC pbByNumber defined?

238 views Asked by At

I am trying to use ArrayDML to insert records into a SQLite database. Setting the TFDQuery.Params.BinMode, the code below fails to compile at pbByNumber.

Where is this value defined please.

FDQuery1.Connection := FDConnection1;

FDQuery1.Params.BindMode := pbByNumber;    // this fails to compile

with FDQuery1 do 
begin
  SQL.Text := 'insert into ' + ourTableName + ' (' +
    'ProdID_0, ProdString_0, ProdBlob_0, ProdFloat_0,' +
    ') values ( ' +
    ':p00, :p01, :p02, :p03 ' +
    ')';

// Set up parameter types
  Params[0].DataType := ftInteger;
  Params[1].DataType := ftString;
  Params[1].Size := 1024;
  Params[2].DataType := ftFloat;

// add values
  for ii := 0 to Params.ArraySize - 1 do begin
    Params[0].AsIntegers[ii] := ii;
    Params[1].AsStrings[ii] := 'Some string ' + IntToStr(ii);
    Params[2].AsFloat := 3.14;
  end;

  // Execute batch
  Execute(numInserts, 0);
end;
1

There are 1 answers

0
René Hoffmann On

As Loghman has already commented, the unit is FireDac.Stan.Param.

You could have found this out yourself by using the Embarcadero DocWiki search: e.g. searching for pbByNumber.