cci_cursor

Description

The cci_cursor function moves 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.

Syntax

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

Return Value
Error Codes
Example

//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);