Fetching and Updating Rowsets

    To fetch and update rowsets from a cursor
  1. Optionally, call SQLSetStmtOption with an fOption of SQL_ROWSET_SIZE to change the number of rows (R) in the rowset.
  2. Call SQLExtendedFetch to get a rowset.
  3. If bound columns are used, use the data values and data lengths now available in the bound column buffers for the rowset.
  4. If unbound columns are used, after calling SQLSetPos to set the cursor position, for each unbound column:
  5. If data-at-execution text or image columns are used, set them up. For more information, see Using Data-at-Execution Columns.
  6. Call SQLSetPos to set the cursor position, refresh, update, delete, or add row(s) within the rowset.

    If data-at-execution text or image columns are used for an update or add operation, handle them. For more information, see Using Data-at-Execution Columns.

  7. Optionally, execute a positioned UPDATE or DELETE statement, specifying the cursor name (available from SQLGetCursorName) and using a different statement handle on the same connection.