Skip to main content
Version: Next

VALIDATE TRANSACTION

VALIDATE TRANSACTION

Does not require any parameters

Description

VALIDATE TRANSACTION accepts the transaction that was started with START TRANSACTION of the corresponding level in the current process. The command saves the changes to the data of the database that occurred during the transaction.

Starting with version 11 of 4D, you can nest several transactions (sub-transactions). If the main transaction is cancelled, all the sub-transactions are cancelled, even if they have been validated individually using this command.

System variables and sets

The system variable OK is set to 1 if the transaction has been validated correctly; otherwise, it is set to 0.

Note that when OK is set to 0, the transaction is automatically cancelled internally (equivalent to CANCEL TRANSACTION). Consequently, you must not explicitly call CANCEL TRANSACTION if OK=0, particularly in the context of nested transactions, because the cancellation will then be applied to the higher level transaction.

See also

CANCEL TRANSACTION
In transaction
START TRANSACTION
Using Transactions