Set the SQL_ATTR_CURSOR_TYPE option to SQL_CURSOR_DYNAMIC. If an attempt is made to scroll backwards with a stored procedure
that did not specify a scrollable cursor, several different problems can occur.
In most cases an error is returned from the server indicating scrolling is
invalid, and in some cases incorrect data is returned.
Even if the stored
procedure returns multiple result sets, you can only use one cursor type.
ODBC either returns an error or ignores the cursor type when a different
cursor type is specified for the second result set. To use a scrollable result
set as one of the result sets, the application needs to set the cursor type
to be scrollable as defined above.
Any attempts to use an updateable
cursor with a stored procedure is ignored. Stored procedure result sets are
read-only.
Cursor sensitivity may not be honored with stored procedure
result sets. Cursor sensitivity is controlled by the way the server cursor
is defined when creating the procedure.