4D v16.3

Active transaction

Home

 
4D v16.3
Active transaction

Active transaction 


 

Active transaction -> Function result 
Parameter Type   Description
Function result  Boolean in 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



See also 

In transaction
RESUME TRANSACTION
SUSPEND TRANSACTION
Suspending transactions

 
PROPERTIES 

Product: 4D
Theme: Transactions
Number: 1387

This command can be run in preemptive processes

 
HISTORY 

Created: 4D v15 R4

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)