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

Using ax_unreg( )

3

The ax_unreg( ) function 3unregisters the previously registered XA data source from the transaction.

3

By default, all XA-compliant external data sources are unregistered 3at the end of a transaction. Use the ax_unreg( ) function 3to unregister the data source before the end of the transaction 3so the data source does not participate in the transaction.

3

Use the following syntax for an ax_unreg( ) function:

3
int ax_unreg(int rmid, int4 flags)
3

For example:

3
     #include "xa.h"
3     #include "milib.h"
3     int   rmid, retcode;
3   if ( (rmid = mi_xa_get_xadatasource_rmid("informix.Newyork")) <= 0)
3       {
3        /* Error while getting XA data source id */
3       }
3  retcode  = ax_unreg(rmid,  TMNOFLAGS);
3  if (retcode != TM_OK )
3     {
3         /* ax_uunreg() Error  */
3     }
3 /* ax_unreg() is Successful */
3

When you use the ax_unreg( ) function, 3follow these guidelines: 3

3 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 ]