Page 1 of 1

preventing a record from being updated

Posted: Mon 22 May 2006 20:06
by Guest
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

Posted: Tue 23 May 2006 09:11
by Antaeus
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.

Posted: Wed 24 May 2006 22:20
by GEswin
Perhaps TClientDataSet is a solution.