Bde.DBTables.TBDEDataSet.OnUpdateError
Delphi
property OnUpdateError: TUpdateErrorEvent read FOnUpdateError write SetOnUpdateError;
C++
__property Data::Db::TUpdateErrorEvent OnUpdateError = {read=FOnUpdateError, write=SetOnUpdateError};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | published | Bde.DBTables.pas Bde.DBTables.hpp |
Bde.DBTables | TBDEDataSet |
Description
Occurs if an exception is generated when cached updates are applied to a database.
Write an OnUpdateError event handler to respond to exceptions generated while applying cached updates to a database.
Because there is a delay between the time a record is first cached and the time cached updates are applied, there is a possibility that another application may change one or more of the same records in the database before the cached changes can be applied. The Borland Database Engine (BDE) checks for this condition and raises an exception. TBDEDataSet responds by calling the OnUpdateError event handler if it exists.
Note: If a call to ApplyUpdates raises an exception and ApplyUpdates is not called within the context of a exception block, an error message is displayed. If an OnUpdateError handler cannot correct the error condition and leaves UpdateAction set to uaFail, the error message is displayed twice. To prevent redisplay, set UpdateAction to uaAbort in the error handler.
Warning: Important:The code in an OnUpdateError handler must not call any methods that make a different record the current one.
OnUpdateError is an event handler of type Data.DB.TUpdateErrorEvent.