From RAD Studio API Documentation
Jump to: navigation, search


TEventStatus = (esOK, esErrorsOccured, esCantDeny, esCancel, esUnwantedEvent);


enum DECLSPEC_DENUM TEventStatus : unsigned char { esOK, esErrorsOccured, esCantDeny, esCancel, esUnwantedEvent };


Type Visibility Source Unit Parent
enum public
Data.Win.ADODB Data.Win.ADODB


TEventStatus values indicate the success or failure of an operation.

Read TEventStatus values to determine the success or failure status of an operation that triggers an event. A TEventStatus value is passed to the handler for every event of the TADOConnection and TCustomADODataSet descendant. Each TEventStatus is directly equivalent to the ADO value with a similar name.

In some cases, the event handler status parameter may be assigned a value to alter the outcome of the occurrence that triggered the event. These cases are documented in the help topics for individual connection and dataset component events.

The EventStatus parameter of associated event handlers surfaces the ADO adStatus parameter of its events, which is of ADO type EventStatusEnum. If the operation executed without problem, the TEventStatus value returned is esOK. If the operation did not execute without problem, one of the other values is returned. For instance, esErrorsOccured is returned when the operation failed because of one or more error conditions.

TEventStatus consists of the five constants summarized in the following table:

Execute Option Meaning


Operation executed without problem.


An error occurred during execution of the operation.


A pending connection operation cannot be canceled. (Connection events only.).


A pending connection has been canceled before it became active. (Connection events only.)


Set by the ADO method, prevents subsequent notification of the event.

See Also