I need to iterate through a number of MySQL queries and save them in an array of TMemDataset
's. This seems to do it:
MemDataset1.CopyFromDataset(ZQuery1,True);
However each time the query changes, all the previous TMemDataset
's are changed to contain the new values (I guess because they are "data-aware components"). If I get rid of ZQuery1
with ZQuery1.Free
, then all of the data vanishes. How do I avoid this?
I am using FreePascal, but I bet the solution for Delphi would apply too.