Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Previous sectionNext section

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
Copy code to clipboard

See Also

FeedbackOpens in a new window