Hello!
I want to copy (insert) all the records from a TClientDataSet into a TUniTable (SQLite).
Data structure is the same of both sources.
Currently I am looping row by row, column by column and insert each value manually.
So is there a better (faster) way? I just need to transfer the data 1:1 into the target table (target table is empty).
Any ideas??
ClientDataSet records into SQLite table - HOW?
Re: ClientDataSet records into SQLite table - HOW?
To solve your task, you can use the CRBatchMove class that comes with our components: https://www.devart.com/unidac/docs/deva ... chmove.htm
For example :
For example :
Code: Select all
uses CRBatchMove;
...
var
crBatchMove: TCRBatchMove;
CDS : TClientDataSet;
UniQuery : TUniQuery;
begin
...
crBatchMove := TCRBatchMove.Create(nil);
try
crBatchMove.Source := CDS;
crBatchMove.Destination := UniQuery;
crBatchMove.Execute;
finally
crBatchMove.Free;
end;
end;