SQLExtendedFetch

The SQLExtendedFetch function returns one row set (set in SQLSetStmtOption) of data to the application. It takes as input the statement handle, the fetch type, and the number of the row to fetch. It returns the number of rows actually fetched and, optionally, an array that contains status values for each row.

The following fetch types are supported:

SQL_FETCH_ABSOLUTE
SQL_FETCH_FIRST
SQL_FETCH_LAST
SQL_FETCH_NEXT
SQL_FETCH_PRIOR
SQL_FETCH_RELATIVE
SQL_FETCH_BOOKMARK

SQL_FETCH_NEXT is required when the cursor type is SQL_CURSOR_FORWARD_ONLY. SQL_FETCH_ABSOLUTE is not supported for Dynamic cursors. SQL_FETCH_BOOKMARK is supported for Static and Keyset cursors only.