BeginTransComplete, CommitTransComplete, and RollbackTransComplete Events (ADO)


These events will be called after the associated operation on the Connection object finishes executing.

  • BeginTransComplete is called after the BeginTrans operation.

  • CommitTransComplete is called after the CommitTrans operation.

  • RollbackTransComplete is called after the RollbackTrans operation.

BeginTransComplete TransactionLevel, pError, adStatus, pConnectionCommitTransComplete pError, adStatus, pConnectionRollbackTransComplete pError, adStatus, pConnection


A Long value that contains the new transaction level of the BeginTrans that caused this event.


An Error object. It describes the error that occurred if the value of EventStatusEnum is adStatusErrorsOccurred; otherwise it is not set.


An EventStatusEnum status value. When any of these events is called, this parameter is set to adStatusOK if the operation that caused the event was successful, or to adStatusErrorsOccurred if the operation failed.

These events can prevent subsequent notifications by setting this parameter to adStatusUnwantedEvent before the event returns.


The Connection object for which this event occurred.

In Visual C++, multiple Connections can share the same event handling method. The method uses the returned Connection object to determine which object caused the event.

If the Attributes property is set to adXactCommitRetaining or adXactAbortRetaining, a new transaction starts after committing or rolling back a transaction. Use the BeginTransComplete event to ignore all but the first transaction start event.