FetchNextRowsEx()


" "

short FetchNextRowsEx(long QueryID, long* NumRows)

Description

This function fetches the next NumRows rows of data from the database. You can use this function in environments that do not support VARIANT arrays, such as Microsoft Access 2.0. Use this function in conjunction with GetColumnValueEx() to retrieve the data in each column for a given row.

Parameters

Name Description
QueryID The ID of the query, as returned from InitializeQuery() or InitializeStaticQuery().
NumRows A pointer to a long integer containing the number of rows to fetch. If the number of unfetched rows in the result set is less than NumRows, NumRows is reset to the actual number of rows contained in the result.

Return Value

The return value will be zero if successful or non-zero if unsuccessful. When the end of the result set is reached, the return value is negative one (-1). If the return value is non-zero, you can call GetLastErrorString(), GetLastErrorType(), GetLastSQLCode(), GetLastSQLError(), or GetLastSQLState() to get additional error information.

Related Tasks

FetchNextRow()
FetchNextRowEx()
FetchNextRows()