var
i: Integer;
begin
// describe the SQL query
IBCQuery1.SQL.Text := '
INSERT INTO BATCH_TEST VALUES (:ID, :F_INTEGER, :F_FLOAT, :F_STRING, :F_DATE)';
// define the parameter types passed to the query :
IBCQuery1.Params[0].DataType := ftInteger;
IBCQuery1.Params[1].DataType := ftInteger;
IBCQuery1.Params[2].DataType := ftFloat;
IBCQuery1.Params[3].DataType := ftString;
IBCQuery1.Params[4].DataType := ftDateTime;
// specify the array dimension:
IBCQuery1.Params.ValueCount := 1000;
// populate the array with parameter values:
for i := 0
to IBCQuery1.Params.ValueCount - 1
do
begin
IBCQuery1.Params[0][i].AsInteger := i + 1;
IBCQuery1.Params[1][i].AsInteger := i + 2000 + 1;
IBCQuery1.Params[2][i].AsFloat := (i + 1) / 12;
IBCQuery1.Params[3][i].AsString := '
Values ' + IntToStr(i + 1);
IBCQuery1.Params[4][i].AsDateTime := Now;
end;
// insert 1000 rows into the BATCH_TEST table
IBCQuery1.Execute(1000);
end;