- Code: Select all
session << "CREATE PROCEDURE storedProcedure "
"@outParam int = 0 OUTPUT "
"AS "
"SET @outParam = -1 ", now;
int i = 0;
session << "{call storedProcedure(?)}", out(i), now;
assert(-1 == i);
However, if I remove the default value for the stored procedure parameter outParam, I get an error for not supplying the input parameter, even if I specify io(i) (io() binds the parameter both ways) instead of out(i). ODBC (SQL Native Driver ver. 2005.90.3042.00) complains that it has no parameter supplied for the outParam.
Due to the above described problem, I have not been able to successfully pass an input parameter to SQL Server stored procedure. Oracle stored procedure tests all pass without problems.
Any help will be greatly appreciated. The code in question is in SVN
Alex





