Instead of establishing polling loops to periodically test for the completion of asynchronous operations, you can code your own event handlers to trap the query, connection, and other asynchronous operation events as they occur.
The following tables briefly describes each of the RDO asynchronous query events.
rdoEngine Object Asynchronous Events
Event | Fires … |
InfoMessage | When SQL_SUCCESS_WITH_INFO is returned by an ODBC API function. |
rdoEnvironment Object Asynchronous Events
Event | Fires … |
BeginTrans | After the BeginTrans method has completed. |
CommitTrans | After the CommitTrans method has completed. |
RollbackTrans | After the RollbackTrans method has completed. |
rdoConnection Object Asynchronous Events
Event | Fires … |
BeforeConnect | Before the call to SQLDriverConnect so the developer can do his own prompting. |
Connect | After a connection operation completes — successfully or not. |
Disconnect | After a connection has been closed. |
QueryComplete | After an query completes — successfully or not. |
QueryTimeout | When the QueryTimeout time has elapsed and the query has not yet completed. |
WillExecute | Before the query is run, allowing the developer to prohibit the query from running or make last-minute adjustments to the SQL. |
rdoResultset Object Asynchronous Events
Event | Fires … |
Associate | After a new connection is associated with the object. |
Dissociate | After the connection is set to nothing. |
ResultsChange | After current rowset is changed (multiple result sets). |
RowCurrencyChange | After the state of the current row has changed (due to an edit, delete, or insert) or when the current row pointer has changed. |
RowStatusChange | After the state of the current row has changed (due to an edit, delete or insert). |
WillAssociate | Before a new connection is associated with the object — developer can override or cancel the operation. |
WillDissociate | Before the connection is set to nothing — developer can override or cancel the operation. |
WillUpdateRows | Before an update to the server occurs — developer can override or cancel the operation. |
rdoColumn Object Asynchronous Events
Event | Fires … |
DataChange | When the value of the column has changed. |
WillChangeData | Before data is changed in the column; allows developer to cancel. |