short FetchNextRow(long QueryID, VARIANT* Row)
Description
This function fetches the next row of data from the database.
Parameters
Name | Description |
---|---|
QueryID | The ID of the query, as returned from InitializeQuery() or InitializeStaticQuery(). |
Result |
A pointer to a VARIANT in which the result will be stored. The result is an array (variant type VT_ARRAY | VT_VARIANT) containing one value for each column in the row. Call GetColumnCount() to determine the number of values in the array. Each value is specified in its native data type or the closest variant data type. The supported return types are:
When the end of the result set has been reached (there are no more rows to fetch) or if the result set is empty, the result is empty (variant type VT_EMPTY) instead of an array. Initialize the VARIANT before calling this function. Visual Basic does this automatically. Visual C++ programmers should call VariantInit().
|
Return Value
The return value will be zero if successful or non-zero if unsuccessful. If the return value is non-zero, you can call GetLastErrorString(), GetLastErrorType(), GetLastSQLCode(), GetLastSQLError(), or GetLastSQLState() to get additional error information.
Related Tasks