The mi_xa_get_current_xid() function

The mi_xa_get_current_xid() function returns the pointer to the current XID structure for an XA-compliant, external data source. The XID structure is defined in the $INFORMIXDIR/incl/public/xa.h file.

Syntax

XID * mi_xa_get_current_xid ()
Valid in client LIBMI application? Valid in user-defined routine?
No Yes

Usage

The mi_xa_get_current_xid() function must be invoked from within the applicable transaction.

If you receive an error, check for any of the following problems:
  1. Make sure that the mi_xa_get_current_xid() function is called from within the transaction.
  2. Make sure that the mi_xa_get_current_xid() function is not called
    • From the sub-ordinator of a distributed transaction.
    • In a non-logging database

For more information about working with XA data sources, see the Informix® DataBlade® API Programmer's Guide.

Return values

NULL
An error occurred while getting the resource manager ID.

Return values that are other than NULL are pointers to the current XID structure.