Method: SQLAnywhere::SQLAnywhereInterface#sqlany_get_next_result

Defined in:
ext/sqlanywhere.c

#sqlany_get_next_result(VALUEimp_drh, VALUEsqlany_stmt) ⇒ Object

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

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.

<b>Parameters</b>:
- <tt>VALUE imp_drh</tt> -- An initialized API structure to finalize.
- <tt>VALUE sqlany_stmt</tt> -- A statement object that was executed by sqlany_execute() or sqlany_execute_direct().

<b>Returns</b>:
- <tt>VALUE result</tt>: <tt>1</tt> if was successfully able to advance to the next result set, <tt>0</tt> otherwise.


1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
# File 'ext/sqlanywhere.c', line 1283

static VALUE
static_SQLAnywhereInterface_sqlany_get_next_result(VALUE imp_drh, VALUE sqlany_stmt)
{
    imp_drh_st* s_imp_drh;
    a_sqlany_stmt* s_sqlany_stmt;
    sacapi_bool result;

    Data_Get_Struct(imp_drh, imp_drh_st, s_imp_drh);
    Data_Get_Struct(sqlany_stmt, a_sqlany_stmt, s_sqlany_stmt);

    result = s_imp_drh->api.sqlany_get_next_result(s_sqlany_stmt);
    
    return( INT2NUM(result) );    
}