Reputation: 36244
I would like to copy a whole TClientDataSet instance into another so I can recover any changes made in the original one. I've tried to saveToStream, to copy the data property but in all cases I loose the fields configurations (displayLabel, size, etc.)
Is there a way to do what I'm trying?
Upvotes: 0
Views: 3496
Reputation:
This should work:
DestClientDataSet.Data := SrcClientDataSet.Data;
Upvotes: 2
Reputation: 21950
Delphi will only stream published properties. You may need to tweak things a bit to get everything out & back correctly. See http://www.delphipages.com/news/detaildocs.cfm?ID=145 for an example of the hooks.
-- MarkusQ
Upvotes: 2