views:

383

answers:

3

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?

+1  A: 

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

MarkusQ
link is now dead.
Dano
A: 

Did you try TClientdataset.Clonecursor ?

AhmetC
+1  A: 

This should work:

DestClientDataSet.Data := SrcClientDataSet.Data;