ATMI C Function Reference
tx_set_transaction_control()
—Sets the transaction_control
characteristic.
#include <tx.h>
int tx_set_transaction_control(TRANSACTION_CONTROL control)
tx_set_transaction_control()
sets the transaction_control
characteristic to the value specified in control
. This characteristic determines whether tx_commit()
and tx_rollback()
start a new transaction before returning to their caller. tx_set_transaction_control()
may be called regardless of whether the application program is in transaction mode. This setting remains in effect until changed by a subsequent call to tx_set_transaction_control()
.
The initial setting for this characteristic is TX_UNCHAINED
.
The following are the valid settings for control
:
In a multithreaded application, a thread in the TPINVALIDCONTEXT
state is not allowed to issue a call to tx_set_transaction_control()
.
Upon successful completion, tx_set_transaction_control()
returns TX_OK
, a non-negative return value.
Under the following conditions, tx_set_transaction_control()
does not change the setting of the transaction_control
characteristic and returns one of these negative values:
The function was called in an improper context (for example, the caller has not yet called tx_open()
).
tx_begin(3c)
, tx_commit(3c)
, tx_info(3c)
, tx_open(3c)
, tx_rollback(3c)
Both the X/Open TX interface and the X-Windows system define the type XID. It is not possible to use both X-Windows calls and TX calls in the same file.