Save ClientDataSet data to an XML file

2

I made a simple registry system without involving database, I need to know how I write files from the ClientDataSet registry in an XML file and when I check them they appear on my grid!

    
asked by anonymous 23.05.2014 / 18:51

1 answer

4

To save TClientDataSet to an xml file:

ClientDataSet1.SaveToFile('c:\teste.xml', dfXML); //Como bem lembrado pelo @Caputo

To load TClientDataSet of an xml file:

ClientDataSet1.LoadFromFile('c:\teste.xml');

File created by the SaveToFile command:

    
23.05.2014 / 19:10