OpenAPI User Guide > OpenAPI User Guide > OpenAPI Function Reference > OpenAPI Functions > IIapi_savePoint() Function--Mark Savepoint in a Transaction for Partial Rollback
Was this helpful?
IIapi_savePoint() Function--Mark Savepoint in a Transaction for Partial Rollback
The IIapi_savePoint() function marks a savepoint in a transaction for a partial rollback with the IIapi_rollback() function.
The sp_savePointHandle parameter that is output from this function is unique to the transaction and remains valid until the transaction is committed or completely rolled back.
This function has the following syntax:
II_VOID IIapi_savePoint (IIAPI_SAVEPTPARM *savePtParm);
typedef struct _IIAPI_SAVEPTPARM
{
       IIAPI_GENPARM  sp_genParm;
       II_PTR         sp_tranHandle;
       II_CHAR        *sp_savePoint;
       II_PTR         sp_savePointHandle;
} IIAPI_SAVEPTPARM;
This function has the following parameters:
sp_genParm
Type: input and delayed output
Specifies the generic parameters. For a description, see Generic Parameters).
sp_tranHandle
Type: input
Specifies the transaction handle identifying the transaction for which the savepoint is specified. Its value is either from qy_tranHandle of IIapi_query(), ba_tranHandle of IIapi_batch(), or co_tranHandle parameter of IIapi_connect().
sp_savePoint
Type: input
Specifies the identifier for the savepoint marker. It is a NULL-terminated string unique within the transaction.
sp_savePointHandle
Type: delayed output
Specifies the savepoint handle identifying the savepoint marker.
Last modified date: 01/30/2023