DB2 10.5 for Linux, UNIX, and Windows

SQLExtendedFetch function (CLI) - Extended fetch (fetch array of rows)

In ODBC 3.0, SQLExtendedFetch() has been deprecated and replaced with SQLFetchScroll(). Although this version of CLI continues to support SQLExtendedFetch(), use SQLFetchScroll() in your CLI programs so that they conform to the latest standards.

Migrating to the new function

The statement:
   SQLExtendedFetch(hstmt, SQL_FETCH_ABSOLUTE, 5, &rowCount, &rowStatus);
for example, would be rewritten using the new function as:
   SQLFetchScroll(hstmt, SQL_FETCH_ABSOLUTE, 5);
Note:
The information returned in the rowCount and rowStatus parameters of SQLExtendedFetch() are handled by SQLFetchScroll() as follows:
  • rowCount: SQLFetchScroll() returns the number of rows fetched in the buffer pointed to by the SQL_ATTR_ROWS_FETCHED_PTR statement attribute.
  • rowStatus: SQLFetchScroll() returns the array of statuses for each row in the buffer pointed to by the SQL_ATTR_ROW_STATUS_PTR statement attribute.