Marks the successful completion of a transaction.
marks the successful end of a transaction initiated by the corresponding TSTART
decrements the value of the $TLEVEL
special variable. Caché terminates the transaction only if $TLEVEL
goes to 0. Usually this is when TCOMMIT
has been called as many times as TSTART
. Changes made during nested transactions are not committed until $TLEVEL
An optional postconditional expression. Caché executes the command if the postconditional expression is true (evaluates to a nonzero numeric value). Caché does not execute the command if the postconditional expression is false (evaluates to zero). For further details, refer to Command Postconditional Expressions
in Using Caché ObjectScript
Caché supports the nesting of the TSTART
commands, so that modules can issue their TSTART
pairs correctly, independent of any other TSTART
issued in the modules that called them or in the modules they call. The current nesting level of the transaction is tracked by the special variable $TLEVEL
. The transaction is committed when the outermost matching TCOMMIT
is issued; that is, when $TLEVEL
goes back to 0.
You can roll back individual nested transactions by calling TROLLBACK 1
or roll back all current transactions by calling TROLLBACK
rolls back the whole transaction that is in effect no matter how many levels of TSTART
were issued and sets $TLEVEL
To synchronize the completion of transactions over a network, use the ZSYNC
command requests a flush of the journal data involved in that transaction to disk. Whether to wait for this disk write operation to complete is a configurable option.
Go to the Management Portal
, select [Home] > [Configuration] > [Compatibility Settings]
. View and edit the current setting of SynchCommit
. When set to true
does not complete until the journal data write operation completes. When set to false
does not wait for the write operation to complete. The default is false
. A restart is required for a change to the SynchCommit
setting to take effect.
ObjectScript and SQL transaction commands are fully compatible and interchangeable, with the following exception:
and SQL START TRANSACTION
both start a transaction if no transaction is current. However, START TRANSACTION
does not support nested transactions. Therefore, if you need (or may need) nested transactions, it is preferable to start the transaction with TSTART
. If you need compatibility with the SQL standard, use START TRANSACTION
ObjectScript transaction processing provides limited support for nested transactions. SQL transaction processing supplies support for savepoints within transactions.