From RAD Studio API Documentation
Jump to: navigation, search


typedef void __fastcall (__closure *TUpdateErrorEvent)(TDataSet* DataSet, EDatabaseError* E, TUpdateKind UpdateKind, TUpdateAction &UpdateAction);


Type Visibility Source Unit Parent
typedef public Data.DB.hpp Data.DB Data.DB


TUpdateErrorEvent is the event that occurs when errors appear during the update action.

TUpdateErrorEvent is the event handler that deals with errors that may occur during the update action.

DataSet is the name of the dataset to which updates are applied.

E is a pointer to an EDatabaseError object from which an application can extract an error message and the actual cause of the error condition. You can use this information to determine how to respond to the error condition.

UpdateKind indicates whether the error occurred while inserting, deleting, or modifying a record.

UpdateAction indicates the action to take after your event handler finishes. On entry into the handler, UpdateAction is always set to uaFail. If your event handler can handle or correct the error, set UpdateAction to uaRetry before exiting the error handler.

The error handler can use the OldValue and NewValue properties of TField to evaluate error conditions and set NewValue to a new value to reapply. In this case, set UpdateAction to uaRetry before exiting.

See Also