Good day to all. They say that life without problems is boring, but I would like to live without problems for at least a year. I work with the xml file, and I need to delete all the entries. My code is:
if dm.ClientDataSet2.Active=false then dm.ClientDataSet2.Open; dm.ClientDataSet2.Edit; dm.ClientDataSet2.First; while not(dm.ClientDataSet2.RecordCount=0) do dm.ClientDataSet2.delete; dm.ClientDataSet2.SaveToFile(); dm.ClientDataSet2.MergeChangeLog; When the button is pressed for the first time, nothing happens; when it is pressed for the second time, some records remain in the file, only from the third time the file is completely cleared. Tell me, what is wrong here? In the code, it seems, everything is fine.