Recent

Author Topic: [Solved] What is the most stable dataset in memory?  (Read 1930 times)

egsuh

  • Hero Member
  • *****
  • Posts: 1292
[Solved] What is the most stable dataset in memory?
« on: March 29, 2017, 12:37:56 pm »
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.
« Last Edit: March 29, 2017, 05:21:48 pm by egsuh »

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: What is the most stable dataset in memory?
« Reply #1 on: March 29, 2017, 02:00:32 pm »
You can edit it  as solved..
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

 

TinyPortal © 2005-2018