IIapi_registerXID() Function--Reserve Unique ID for Two-phase Commit Transaction
The IIapi_registerXID() function reserves a unique ID to begin a two-phase commit transaction with IIapi_query() or to restart a previously-aborted two-phase commit transaction with IIapi_connect(). An application must use IIapi_registerXID() if a two-phase commit transaction is being used.
After this function is successfully completed, the output parameter rg_tranIdHandle can be used as input for IIapi_connect() and IIapi_query() to specify a transaction. The transaction ID handle can be used on multiple transactions; it does not uniquely identify one transaction.
The transaction ID handle returned by this function must be release using IIapi_releaseXID().
This function has the following syntax:
VOID IIapi_registerXID (IIAPI_REGXIDPARM *regXIDParm);
typedef struct _IIAPI_REGXIDPARM
{
IIAPI_TRAN_ID rg_tranID;
PTR rg_tranIdHandle;
IIAPI_STATUS rg_status;
} IIAPI_REGXIDPARM;
This function has the following parameters:
rg_tranID
Type: input
Specifies the parameter identifying a unique transaction ID. This parameter has the data type of IIAPI_TRAN_ID, which specifies a globally unique Ingres transaction identification.
rg_tranIdHandle
Type: immediate output
Specifies the transaction ID handle identifying the transaction ID registered with OpenAPI. This handle is used as input to IIapi_query() and IIapi_connect().
rg_status
Type: immediate output
Indicates the status of IIapi_registerXID() upon completion. Its value can be one of the following:
• IIAPI_ST_SUCCESS
• IIAPI_ST_FAILURE
• IIAPI_ST_OUT_OF_MEMORY
Last modified date: 11/09/2022