CommitTrans Method

Commits a transaction.

Applies to objects: Connection, Database, Workspace.

Syntax

[[Let] RetVal = ] object.CommitTrans()

The CommitTrans method syntax has these parts:

Part Description
object Required. A reference to an instance of the object.
RetVal Optional. A Boolean type variable that indicates whether the transaction has been committed.

Remarks

All operations between BeginTrans and CommitTrans will be performed.

On calling the CommitTrans method of the Workspace object, CommitTrans methods of all its Connection and Database objects will be called. The CommitTrans method of the Workspace object returns no result.

On calling the CommitTrans method the automatical transaction execution mode is restored. So, to form the next transaction, BeginTrans must be called again.

If transaction is not closed, the CommitTrans function will be called on destroying or closing the object, controlling the transaction so that the changes come in force.

Depending on the driver and the database, the CommitTrans and RollbackTrans methods can close the open pointers of Recordset objects.

Example

.......

 

See Also

Connection Object, Database Object, Workspace Object, BeginTrans Method, RollbackTrans Method.