Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

cci_savepoint

Description

The cci_savepoint function configures savepoint or performs transaction rollback to a specified savepoint. If cmd is set to CCI_SP_SET, it configures savepoint and if it is set to CCI_SP_ROLLBACK, it rolls back transaction to specified savepoint.

Syntax

intcci_savepoint(int conn_handle, T_CCI_SAVEPOINT_CMD cmd, char* savepoint_name, T_CCI_ERROR *err_buf)

  • conn_handle: (IN) Connection handle
  • cmd: (IN) CCI_SP_SET or CCI_SP_ROLLBACK
  • savepoint_name: (IN) Savepoint name
  • err_buf: (OUT) Database error buffer
Return Value
  • Error code
Error Code
  • CCI_ER_CON_HANDLE
  • CCI_ER_COMMUNICATION
  • CCI_ER_QUERY_TIMEOUT
  • CCI_ER_NO_MORE_MEMORY
  • CCI_ER_DBMS
Example

con = cci_connect( … );
… /* query execute */

/* Sets the savepoint named "savepoint1"
cci_savepoint(con, CCI_SP_SET, "savepoint1", err_buf);

… /* query execute */

/* Rolls back to specified savepoint,"savepoint1" */
cci_savepoint(con, CCI_SP_ROLLBACK, "savepoint1", err_buf);