The SQL_GetNextResults() function moves to the next results set for the specified pass-through SQL connection.
• SQL_connection – A long integer specifying the pass-through SQL connection for which the next results set will be selected.
A long integer indicating whether the operation was successful. The value 0 indicates the next results set was successfully moved to. The value 31 indicates there are no more results sets for the pass-through SQL connection. Any other value indicates another error occurred.
Once you have moved to the next results set, you can’t return to the previous results set. If the number of results sets is not known, use the SQL_GetNextResults() function to move to the next results set until error 31 is returned.