Optionally, call SQLSetStmtOption with an fOption of SQL_ROWSET_SIZE to change the number of rows (R) in the rowset.
Call SQLExtendedFetch to get a rowset.
If bound columns are used, use the data values and data lengths now available in the bound column buffers for the rowset.
If unbound columns are used, after calling SQLSetPos to set the cursor position, for each unbound column:
Call SQLGetData one or more times to get the data for unbound columns after the last bound column of the rowset. Calls to SQLGetData should be in increasing order of column number.
Call SQLGetData multiple times to get data from a text or image column.
If data-at-execution text or image columns are used, set them up. For more information, see Using Data-at-Execution Columns.
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.
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.