Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?

TRollback

Rolls back (reverts) changes made during the current transaction.

Synopsis

TRollback

Arguments

The TRollback statement does not have any arguments.

Description

TRollback terminates the current transaction and restores all journaled database values to the values they held at the start of the transaction.

Caché Basic does not support nested transactions. A TRollback returns the transaction level ($TLEVEL) to 0, regardless of how many nested TStart statements have been issued.

Examples

The following example illustrates the use of the TRollback statement:

TStart
If StorePerson(personobject) Then
 TCommit
Else
 TRollback
End If

See Also

Feedback