Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread TDataset.BeforeUpdate
Tue, Jun 18 2013 7:50 AMPermanent Link

Ronald

Hi,

On my form I have a TDataSet and if the TDataset.BeforeUpdate is fired I enable my "Savebutton". If the uses save the form, I disable the Savebutton again. The problem is that if the user continues editing the record , the event should be fired again, but that does not happen.
I think this is caused because I use my own submit procedure. The TDataset component does not know about this save and thus can not put the table in a "unmodified" state and will not fire the BeforeUpdate event.
I hoped I could solve this by setting the Modified property to false after each save, but that is readonly.

Thanks,
Greetings,
Ronald
Tue, Jun 18 2013 8:04 AMPermanent Link

Ronald

Ronald wrote:

Hi,

On my form I have a TDataSet and if the TDataset.BeforeUpdate is fired I enable my "Savebutton". If the uses save the form, I disable the Savebutton again. The problem is that if the user continues editing the record , the event should be fired again, but that does not happen.
I think this is caused because I use my own submit procedure. The TDataset component does not know about this save and thus can not put the table in a "unmodified" state and will not fire the BeforeUpdate event.
I hoped I could solve this by setting the Modified property to false after each save, but that is readonly.

Thanks,
Greetings,
Ronald


Oops, sorry, must reply myself again... I should use the Save method. This will clear the appropiate flags.
Tue, Jun 18 2013 11:53 AMPermanent Link

Matthew Jones

>
> Oops, sorry, must reply myself again... I should use the Save
> method. This will clear the appropiate flags.

I find reading the source to the framework answers a lot of my questions. Given it
is in the language I know, it usually works.

/Matthew Jones/
Image