Home | Previous Page | Next Page   Database Access > Working with XA-Compliant External Data Sources > Registering and Unregistering XA-Compliant Data Sources > 3 3 3

Getting the XID Structure

3

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

3

This XID structure that is returned is valid only until the user-defined 3routine terminates. The calling user-defined routine must copy this 3function if it is necessary to keep the data for a longer period 3of time.

3

The syntax for the function is: 3

3
XID * mi_xa_get_current_xid ( )
3

For example: 3

3
     #include "xa.h"
3     #include "milib.h"
3XID * xid;
3xid = mi_xa_get_current_xid();   
3if ( (!xid)
3       {
3        /* Error while getting the curret XID */
3       }
3 /* Successful */
3

If successful, this function returns the pointer to the XID structure, 3which is not null.

3

For more information on this function, see the IBM Informix: DataBlade API Function Reference.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]