Hi,
Is there a simple way to entirely copy a TOraQuery (with its results, preparation, position, dataset, etc...).
NB: it is to always use the same TOraQuery in a recursive loop...
How to "clone" a TOraQuery
You can use the following code to implement necessary functionality,
but notice that you need to specify KeyFields or include RowId field in select statement:
OraQuery1 - base query
OraQuery2 - "clone" query
This solution doesn't assign OraQuery1 results to OraQuery2, so data fetch will be performed once more.
but notice that you need to specify KeyFields or include RowId field in select statement:
OraQuery1 - base query
OraQuery2 - "clone" query
Code: Select all
OraQuery2.Assign(OraQuery1);
OraQuery2.Open;
OraQuery2.GotoCurrent(OraQuery1);