TEventStatus values indicate the success or failure of an operation.
TEventStatus = ( esOK, esErrorsOccured, esCantDeny, esCancel, esUnwantedEvent );
enum TEventStatus { esOK, esErrorsOccured, esCantDeny, esCancel, esUnwantedEvent };
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 |
esOK |
Operation executed without problem. |
esErrorsOccured |
An error occurred during execution of the operation. |
esCantDeny |
A pending connection operation cannot be canceled. (Connection events only.). |
esCancel |
A pending connection has been canceled before it became active. (Connection events only.) |
esUnwantedEvent |
Set by the ADO method, prevents subsequent notification of the event. |
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|