I tried to mimic TClientDataSet of Delphi, using TMemDataSet and TBufDataSet. But I found that both behave a little bit differently.
Q1.
With TMemDataSet, I tried to edit a field, so I used
memds.Edit;
memds.Fieldbyname('a') := 'a';
memds.Post;
This results in adding a new record leaving the original one.
With TBufDataSet, the previous procedure did not do anything. Do I need anything more to store them?
Q2.
Regarding "Clear", TMemDataSet.Clear(false) works fine. It deletes all the records, leaving the dataset structure (like fields). But not sure how TBufDataSet.Clear works. It seems to clear the field definitions as well.
Am I right? Please advise. Thank you.