OpenAPI User Guide > OpenAPI User Guide > OpenAPI Function Reference > OpenAPI Functions > IIapi_abort() Function--Abort a Connection
Was this helpful?
IIapi_abort() Function--Abort a Connection
The IIapi_abort() function closes a connection opened with IIapi_connect() and frees all the resources associated with the connection handle.
Any transaction associated with the connection is aborted, and the transaction handle freed, as are all associated statements and database event handles.
While this function can be used to clean up quickly when a problem is detected on a connection, applications are encouraged to continue calling IIapi_close(), IIapi_commit() or IIapi_rollback(), and IIapi_disconnect() to cleanly shut down server connections.
This function has the following syntax:
II_VOID IIapi_abort ( IIAPI_ABORTPARM *abortParm );
typedef struct _IIAPI_ABORTPARM
{
      IIAPI_GENPARM   ab_genParm;
      II_PTR          ab_connHandle;
} IIAPI_ABORTPARM;
This function has the following parameters:
ab_genParm
Type: input and delayed output
Specifies the generic parameters.
For a description, see Generic Parameters.
ab_connHandle
Type: input
Specifies the connection handle to be disconnected immediately. All resources associated with this connection are also freed.
Last modified date: 08/28/2024