short GetStoredProcedureResultSets(long QueryID, VARIANT* ResultSets)
Description
This function retrieves the query IDs for the result sets returned by the stored procedure executed with the original QueryID. Each query ID returned can be used with FetchNextRow() or FetchNextRows() to retrieve the result set rows, and Close() when the end of each result set is reached.
Parameters
Name | Description |
---|---|
QueryID | The ID of the original query, as returned from InitializeQuery(). |
ResultSets | A pointer to a VARIANT in which the query IDs for the result sets are stored. The result is an array of long integers (variant type VT_ARRAY | VT_I4), with each integer being the query ID for the corresponding result sets. If the stored procedure did not return any result sets, the result is empty (variant type VT_EMPTY). 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() or GetLastErrorType() to get additional error information.