You must set the following attributes to use scrollable cursors:
SQL_ATTR_CURSOR_SCROLLABLE – the type of scrollable cursor you are using. It should be set to the value of SQL_SCROLLABLE. Possible values are static, semi-sensitive, and insensitive.
SQL_ATTR_CURSOR_SENSITIVITY – the sensitivity value for this scrollable cursor. The only supported value for this is SQL_INSENSITIVE.
The following are optional attributes when using scrollable cursors:
SQL_ATTR_ROW_ARRAY_SIZE – the number of rows that you want returned from each call to the SQLFetchScroll() method. If you do not set this value, the default value of one row is used.
SQL_ATTR_CURSOR_TYPE – The type of scrollable cursor you are using. The only supported values for this are SQL_CURSOR_FORWARD_ONLY or SQL_CURSOR_STATIC.
SQL_ATTR_ROWS_FETCHED_PTR – the address where the number of rows fetched are stored. The SQL_ATTR_ROWS_FETCHED_PTR points to a variable of datatype SQLUINTEGER.
SQL_ATTR_ROW_STATUS_PTR – the address where the row status is stored. The SQL_ATTR_ROW_STATUS_PTR points to a variable of datatype SQLUSMALLINT.