sqlany_get_next_result( a_sqlany_stmt *) method

Advances to the next result set in a multiple result set query.

Syntax

public sacapi_bool sqlany_get_next_result ( a_sqlany_stmt * sqlany_stmt)

Parameters

Returns

1 if the statement successfully advances to the next result set, 0 otherwise.

Usage

If a query (such as a call to a stored procedure) returns multiple result sets, then this function advances from the current result set to the next.

The following example demonstrates how to advance to the next result set in a multiple result set query:

                 
stmt = sqlany_execute_direct( sqlany_conn, "call my_multiple_results_procedure()" );
if( result ) {
    do {
        while( sqlany_fetch_next( stmt ) ) {
           // get column data    
        }
    } while( sqlany_get_next_result( stmt ) );
    sqlany_free_stmt( stmt );
}