See Also: Transactions and DDOs, Abort_Transaction, Begin_Transaction, Lock, Unlock, DF_TRANABORT_ONERROR, DF_TRANSACTION_ABORT
To explicitly mark the end of a database transaction.
End_Transaction
Transactions begin with a Begin_Transaction command and end with an End_Transaction command. Transactions are comprised of all the database table operations between the Begin_Transaction and End_Transaction commands. A side effect of the End_Transaction command is to execute an unlock command.
If an error occurs during a transaction, the entire transaction can be rolled back to its original pre-transaction state. After the End_Transaction command executes, the transaction is over and it may not be rolled back.
Abort_transaction commands executed after an End_Transaction command will generate an error.
The Begin_Transaction and End_Transaction commands must be matched within the same scope. The following would not be legal:
Begin_Transaction
: // Database update commands.
if (Not(Found)) Begin
End_Transaction
// More code.
End