Home | Previous Page | Next Page   Function Descriptions > 3 3 3

mi_xa_get_xadatasource_rmid( )

3
The mi_xa_get_xadatasource_rmid( ) function 3gets the resource manager ID that was previously created in the 3database for an XA-compliant, external data source. 3
3

Syntax

3
3
mi_integer mi_xa_get_xadatasource_rmid(mi_string *xasrc)
3
3
xasrc
3
is the user-defined name of the XA data source. 3
3
3 33333333333333
Valid in 3Client LIBMI Application? Valid in User-Defined Routine?
No Yes
3
3

Usage

3
3

The mi_xa_get_xadatasource_rmid( ) function 3can be used while invoking the ax_reg( ) or 3the ax_unreg( ) function in subsequent calls. 3If successful, this function returns the resource manger ID.

3

The format of the xarsc name is [owner].xadatasourcename. 3If the owner is specified, the mi_xa_get_xadatasource_rmid( ) function 3searches for the owner and the data source name. If the owner is 3not specified, the function: 3

3 3

If you receive an error, check for any of the following problems: 3

3
    3
  1. Make sure the value for xasrc is correct.
  2. 3
  3. Make sure that the mi_xa_get_xadatasource_rmid( ) function 3is not called: 3 3
      3
    • From the sub-ordinator of a distributed transaction.
    • 3
    • In a non-logging database
  4. 3
  5. Make sure that the xasrc XA data source 3is created in the database.
3
3

Return Values

3
3
3
> 0
3
is the resource manager ID. 3
3
MI_ERROR
3
indicates that an error occurred while getting the resource manager 3ID. 3
3
MI_NOSUCH_XASOURCE
3
indicates that the XA data source does not exist in the system. 3
3
MI_INVALID_XANAME
3
indicates that the user-defined name (owner.xadatasourcename) 3for an instance of XA data source is not valid. 3
3
3
3

Related Topics

3
3

See the descriptions of ax_reg( ) and ax_unreg( ).

3

For more information on working with XA data sources, see the IBM Informix: DataBlade API Programmer's Guide.

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