The mi_transaction_state() function (Server)
The mi_transaction_state() function returns the current transaction state (none, implicit, or explicit).
Syntax
mi_integer mi_transaction_state()
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Usage
The mi_transaction_state() function enables you to base conditional actions on the transaction state. An explicit transaction is any transaction that the BEGIN WORK statement starts. An implicit transaction is any transaction that the database server initiates and the BEGIN WORK statement does not start.
Return values
- MI_NO_XACT
- No transaction is currently in effect.
- MI_IMPLICIT_XACT
- An implicit transaction is currently in effect.
- MI_EXPLICIT_XACT
- An explicit transaction is currently in effect.