I need add 10-1000 row. I try use function Prepare but not work perfekly. Only one row added
(...)
UniQuery.SQL.Clear;
UniQuery.SQL.Add('INSERT INTO Table (field1,field2,field3) VALUES (:b0,:b1,:b2);');
for I := 0 to 1000 do
begin
UniQuery.ParamByName('b0').AsInteger := 1;
UniQuery.ParamByName('b1').AsInteger := 2;
UniQuery.ParamByName('b2').AsInteger := Random(100);
UniQuery.Prepare;
end;
UniQuery.Execute;
What is the fastest way to add 1000 rows? Executing the "Execute" command 1000 times is slow
How preprare several set queries with TUniQuery
Re: How preprare several set queries with TUniQuery
UniDAC supports Batch Operations. In this mode, you can insert, update, or delete data arrays.
You can find out more about Batch Operations in our docs:
https://www.devart.com/unidac/docs/batchops.htm
You can find out more about Batch Operations in our docs:
https://www.devart.com/unidac/docs/batchops.htm
Re: How preprare several set queries with TUniQuery
Thank youStellar wrote: ↑Tue 05 May 2020 07:07 UniDAC supports Batch Operations. In this mode, you can insert, update, or delete data arrays.
You can find out more about Batch Operations in our docs:
https://www.devart.com/unidac/docs/batchops.htm
Re: How preprare several set queries with TUniQuery
Please contact us if you have any additional questions about our products