This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
Active transaction
|
Active transaction -> Function result | ||||||||
Parameter | Type | Description | ||||||
Function result | Boolean |
![]() |
Returns False if the current transaction is suspended | |||||
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.
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
In transaction
RESUME TRANSACTION
SUSPEND TRANSACTION
Suspending transactions
Product: 4D
Theme: Transactions
Number:
1387
Created: 4D v15 R4
4D Language Reference ( 4D v20 R7)