문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top