Stored Procedures and Open SQL
MySQL CALL syntax can be used when executing stored procedures with RWDBOSql.
RWDBOSql myOpenSqlObject("CALL myStoredProc(?, ?)", RWDBOSql::Procedure);
In this example, myStoredProc is the name of the stored procedure, and ? characters are the placeholders for the parameters to be passed to the stored procedure. Note the provided hint RWDBOSql::Procedure.
Please see An Open SQL Stored Procedure Example for an example that uses RWDBOSql with stored procedures.
Sequence of Fetching Result Sets and Out Parameters
For MySQL stored procedures that return result sets, the MySQL client returns the OUT parameters only after all result sets are returned. Hence, fetchReturnParams() should be called only after completely processing all the result sets, otherwise any other result sets will be lost.