My English is very poor!
ADOQuery.Clone,How to realize
________
Alaska Dispensary
ADOQuery.Clone,How to realize
ADOQuery.Clone,How to realize
Last edited by cxg417 on Tue 15 Feb 2011 14:55, edited 1 time in total.
The loadfromxml method is so slowly! and,crbatchmove have not 'bmCopy'
________
Universal Health Warehouse
________
Universal Health Warehouse
Last edited by cxg417 on Thu 10 Mar 2011 10:56, edited 1 time in total.
Re: ADOQuery.Clone,How to realize
I have similiar porblem, and tried your suggestion with TCRBatchMove. :
CRBatchMove1.Mode := bmAppend;
CRBatchMove1.Source := UniQuery1;
CRBatchMove1.Destination := VirtualDataSet1;
CRBatchMove1.Execute;
But i get Error like this on Execute:
The OnGetRecordCount event handler is not specified'.
When i implement just empty event OnGetRecordCount on VirtualDataSet1, i get no errors, but nothing happens - none data were copied.
CRBatchMove1.Mode := bmAppend;
CRBatchMove1.Source := UniQuery1;
CRBatchMove1.Destination := VirtualDataSet1;
CRBatchMove1.Execute;
But i get Error like this on Execute:
The OnGetRecordCount event handler is not specified'.
When i implement just empty event OnGetRecordCount on VirtualDataSet1, i get no errors, but nothing happens - none data were copied.
Re: ADOQuery.Clone,How to realize
Hi Pavel,
Thanks for your request.
TVitrualDataSet component is not designed to copy data. It doesn’t store data in memory.
Its task is to interact with data through event handlers.
It can be used to represent of arbitrary data (arrays, lists etc.) in tabular form.
You can find a more detailed description of the TVitrualDataSet component in our online documentation:
https://docs.devart.com/virtualdac/deva ... ataset.htm
To copy data, use the TVirtualTable component instead of the TVitrualDataSet component.
The TVirtualTable component represents an in-memory data storage that does not have linked data files.
TVirtualTable allows to load data from a XML file, or from an existing dataset, and then process the data in the usual way, as in any TDataSet descendant.
An example of using TCRBatchMove to copy data from TUniQuery to TVirtualTable:
Thanks for your request.
TVitrualDataSet component is not designed to copy data. It doesn’t store data in memory.
Its task is to interact with data through event handlers.
It can be used to represent of arbitrary data (arrays, lists etc.) in tabular form.
You can find a more detailed description of the TVitrualDataSet component in our online documentation:
https://docs.devart.com/virtualdac/deva ... ataset.htm
To copy data, use the TVirtualTable component instead of the TVitrualDataSet component.
The TVirtualTable component represents an in-memory data storage that does not have linked data files.
TVirtualTable allows to load data from a XML file, or from an existing dataset, and then process the data in the usual way, as in any TDataSet descendant.
An example of using TCRBatchMove to copy data from TUniQuery to TVirtualTable:
Code: Select all
uses
... , CRBatchMove;
...
var
CRBatchMove: TCRBatchMove;
UniQuery: TUniQuery;
VirtualTable: TVirtualTable;
...
begin
...
CRBatchMove := TCRBatchMove.Create(nil);
try
CRBatchMove.Source := UniQuery;
CRBatchMove.Destination := VirtualTable;
CRBatchMove.Execute;
finally
CRBatchMove.Free;
end;
...
end;