preventing a record from being updated

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Guest

preventing a record from being updated

Post by Guest » Mon 22 May 2006 20:06

Hello,

I have a TDBLookupListBox and a few DBEdit components that are all connected to the same table. If you make a change on one of the DBEdits and then move to a different record using the TDBLookupListBox it changes the record. Is there a way to prevent this? (I basically want to force the user to push a button for the changes to take place and not just by moving to another record)

Thanks

---Dave

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 23 May 2006 09:11

The Borland's conception doesn't offer any suitable way to solve this problem. You can try disabling TDBLookupListBox (DBLookupListBox.Enabled := False) after record was edited. The second way is handling events of the control inherited from TDataSet (TMyQuery, TMyTable etc). Please refer to Delphi help for more information about TDataSet events.

GEswin
Posts: 186
Joined: Wed 03 Nov 2004 16:57
Location: Spain
Contact:

Post by GEswin » Wed 24 May 2006 22:20

Perhaps TClientDataSet is a solution.

Post Reply