Occurs when an exception is generated while cached updates are applied to a database.
property OnUpdateError: TUpdateErrorEvent;
E is a pointer to an EDatabaseError object from which application can extract an error message and the actual cause of the error condition. The OnUpdateError handler can use this information to determine how to respond to the error condition.
UpdateKind describes the type of update that generated the error.
UpdateAction indicates the action to take when the OnUpdateError handler exits. On entry into the handler, UpdateAction is always set to uaFail. If OnUpdateError can handle or correct the error, set UpdateAction to uaRetry before exiting the error handler.
The error handler can use the TField.OldValue and TField.NewValue properties to evaluate error conditions and set TField.NewValue to a new value to reapply. In this case, set UpdateAction to uaRetry before exiting.
Note: If a call to ApplyUpdates raises an exception and ApplyUpdates is not called within the context of a try...except block, an error message is displayed. If the 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.
If you want to add a field, for example TIMESTAMP , to the WHERE clause, you must declare it in the table as follows: F_TIMESTAMP timestamp not null default current_timestamp on update current_timestamp . If there are no such TIMESTAMP fields in the table, or if they are not declared as described above, all fields (except fields of type BLOB ) will be added to the WHERE clause for comparison. If the table contains several such TIMESTAMP fields, only the last declared field of this type will be included in the query.