Description

This method will commit the actions performed within this McDBTransaction to the enclosing Level. If this McDBTransaction is not nested (i.e. is at Level 1), the results of the McDBTransaction are actually written to the relevant McDBDatabase(s). If this McDBTransaction is nested, the actions in the active Level are only committed to the enclosing Level, and the net actions are still tentative, pending a Commit of enclosing Level(s).

Return Type

None  

Syntax

object.Commit

The Commit Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDBTransaction.

Remarks

BName: McDBTransaction.Commit()

Note than transacted actions taken on database objects do not fire events until they are committed via this method. McDBNode objects will receive a NodeLocked event when it is written in a transaction, although its NodeModified event will not fire until the McDBTransaction is committed.

Exceptions

Error Value Description
CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT &H80004024 This McDBTransaction is not the McDBDatabases.ActiveTransaction. A McDBTransaction must first be the active one, before it can be committed or aborted.
OLE_E_CANT_BINDTOSOURCE &H8004000A This McDBTransaction is not running. That is, its Level is 0 (immediate commit).