Active transaction
Active transaction -> Function result
Parameter | Type | Description | |
---|---|---|---|
Function result | Boolean | ← | Returns False if the current transaction is suspended |
Description
The Active transaction command returns True if the current process is in transaction, and this transaction is not suspended. It returns False if there is no current transaction, or if the current transaction is suspended. A transaction can be suspended using the SUSPEND TRANSACTION command.
Since the command will also return False if the current process is not in transaction, you may need to check using the In transaction command to know whether the process is in transaction.
For more information, please refer to Suspending transactions.
Description
You want to know the current transaction status:
If(In transaction)
If(Not(Active transaction))
ALERT("The current transaction is suspended")
Else
ALERT("The current transaction is active")
End if
Else
ALERT("We are not in transaction")
End if
See also
In transaction
RESUME TRANSACTION
SUSPEND TRANSACTION
Suspending transactions