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 | 



This function is used to move the cursor specified in the request handle to access the specific record in the query result executed by cci_execute(). The position of cursor is moved by the values specified in the origin and offset values. If the position to be moved is not valid, CCI_ER_NO_MORE_DATA is returned.


int cci_cursor(int req_handle, int offset, T_CCI_CURSOR_POS origin, T_CCI_ERROR *err_buf)

  • req_handle : (IN) Request handle
  • offset : (IN) Offset to be moved
  • origin : (IN) Variable to represent a position. The type is T_CCI_CURSOR_POS. T_CCI_CURSOR_POS enum consists of CCI_CURSOR_FIRST, CCI_CURSOR_CURRENT, and CCI_CURSOR_LAST.
  • err_buf : (OUT) Database error buffer
Return Value
  • Error code (0 : success)
Error Code

//the cursor moves to the first record

cci_cursor(req, 1, CCI_CURSOR_FIRST, &err_buf);


//the cursor moves to the next record

cci_cursor(req, 1, CCI_CURSOR_CURRENT, &err_buf);


//the cursor moves to the last record

cci_cursor(req, 1, CCI_CURSOR_LAST, &err_buf);


//the cursor moves to the previous record

cci_cursor(req, -1, CCI_CURSOR_CURRENT, &err_buf);