Stored Procedures and Open SQL
Standard DB2 CLI stored procedure invocation 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.
RWDBOSql myOpenSqlObject("{ ? = CALL myStoredProc(?, ?)}", RWDBOSql::Procedure);
This example uses an additional placeholder to receive the return value of the stored procedure as an OUT parameter. A DB2 stored procedure is allowed to have a return value only of type integer.
Please see
An Open SQL Stored Procedure Example for an example that uses
RWDBOSql with stored procedures.
NOTE: Stored procedure execution is not supported with the data callback classes.