Setting Cursor Options

    To set cursor options
  1. Call SQLSetStmtOption to set or SQLGetStmtOption to get the statement options that control cursor behavior.
fOption Specifies
SQL_CURSOR_TYPE A cursor type of forward-only, static, dynamic, or keyset
SQL_CONCURRENCY A concurrency control option of read-only, locking, optimistic using timestamps, or optimistic using values
SQL_ROWSET_SIZE The number of rows in the rowset

The default values for these options (forward-only, read-only, rowset size of 1) do not use server cursors. To use server cursors, at least one of these options must be set to a value other than the default, and the statement being executed must be a single SELECT statement or a stored procedure that contains a single SELECT statement.