views:

46

answers:

2

Hi,

This was continuation to my previous question.

I dont want PARAMS CHANGE_LOG data in my XML file while saving the data in ClientDataSet using ClientDataSet1.SaveToFile() method.

My code looks like this:

ClientDataSet1.Insert;
ClientDataSet1.FieldByName('Name').AsString:= 'AAA';
ClientDataSet1.Append;
ClientDataSet1.SaveToFile('c:\Test.xml',dfxml);

How can i achieve this.

+2  A: 

Using ClientDataSet1.MergeChangeLog before saving the XML file solves the problem.

Code looks like this:

ClientDataSet1.MergeChangeLog;
ClientDataSet1.SaveToFile('c:\Test.xml',dfXML);
Bharat
+4  A: 

Set the LogChanges property of your CLientDAtaSet to False, and it will not bulid the ChangeLog for you...

Bob Swart
Thanks Bob. Can you suggest me which is more effective MergeChangeLog or LogChanges=False
Bharat
@Bharat - If you won't make use of the change log, setting 'LogChanges' to false is more effective. When LogChanges is true, data editing becomes slower over time (until changes are merged).
Sertac Akyuz