To erase the saved changes just call TCustomClientDataSet.MergeChangeLog
.
If you do not need the change log at all, set TCustomClientDataSet.LogChanges
to False
(True
is default value) just after open the dataset.
Question
My application uses a TClientDataSet
and a TDataSource
set. No DataBase
involved. The TClientDataSet
is saved in XML
format. I save the TClientDataSet
using the DataSet.SaveToFile
method, and doying so, the saved file retains the Delta changes. I can't use the DataSet.UpplyUpdates
method, because as stated before, there is no DataBase
hence there is no Provider
also.
DataSet.SaveToFile ('SavedFile.XML') // this retains Delta changes
DataSet.ApplyUpdates (0) // can't use it (no Provider)
My question is: how can I force to apply the Delta changes to the TClientDataSet
before saving it to a file? If a save to a binary
format, the Delta changes would be applied?.
Note: closing and subsequently open the TClientDataSet
does not work either.
Solution
To erase the saved changes just call TCustomClientDataSet.MergeChangeLog
.
If you do not need the change log at all, set TCustomClientDataSet.LogChanges
to False
(True
is default value) just after open the dataset.