| 4D v18In transaction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|  | 
    4D v18
 In transaction 
         | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| In transaction -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| Function result | Boolean |   | Returns TRUE if current process is in transaction | |||||
The In transaction command returns TRUE if the current process is in a transaction, otherwise it returns FALSE.
If you perform a multi-record operation (adding, modifying, or deleting records), you may encounter locked records. In this case, if you have to maintain data integrity, you must be in transaction so you can “roll-back” the whole operation and leave the database untouched.
If you perform the operation from within a trigger or from a subroutine (that can be called while in transaction or not), you can use In transaction to check whether or not the current process method or the caller method started a transaction. If a transaction was not started, you do not even start the operation, because you already know that you will not be able to roll it back if it fails.
									Active transaction
									
									CANCEL TRANSACTION
									
									START TRANSACTION
									
									Triggers
									
									VALIDATE TRANSACTION
									
	Product:  4D
	Theme:  Transactions
	Number:  
        397
        
        
        
	
	Created:  4D v6
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v18)
	
	
	
	
	
 Add a comment
Add a comment