Overview
Features
Download
Documentation
Community
Add-Ons & Services

Any SQL Server Experts Out There?

General discussion regarding the development of POCO for contributors.

Any SQL Server Experts Out There?

Postby alex » 31 May 2007, 01:35

I have a problem calling SQL Server stored procedures. For example, the following works fine:

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
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Any SQL Server Experts Out There?

Postby alex » 06 Jun 2007, 03:46

Never mind (figured it out).
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest

cron