Product Documentation

FairCom Direct SQL for C and C++

Previous Topic

Next Topic

ctsqlSetScrollableCursor

Added in FairCom DB V11.5, ctsqlSetScrollableCursor sets or clears the auto-commit flag. When the scrollable cursor flag is turned on in the command handle, the cursor returned by the Execute function will be scrollable and the number of rows properly set to the rows in the resultset. This support has been implemented to obtain the number of rows in the resultset.

Note: Currently, the only reason to set scrollable cursors is to obtain the number of rows in the resultset immediately. At this time, there is no support to scroll through the resultset other than "next" (forward only).

Parameters:

  • [hCmd] - Must point to a valid command handle
  • flag [IN] - Indicate if the scrollable cursor flag is to be turned on or off.

    CTSQL_TRUE indicates that the scrollable cursor flag is to be turned on, while CTSQL_FALSE indicates that the scrollable cursor flag is to be turned off.

Return:

Returns CTSQLRET_OK on success.

TOCIndex