Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling Stored Procedure with two parameters
Message
From
12/10/2010 14:37:47
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Calling Stored Procedure with two parameters
Miscellaneous
Thread ID:
01485066
Message ID:
01485066
Views:
107
Hi,

I'm trying to adapt this example code from the MM.NET help file to pass in two parameters, one is an input and one an output:
   // Create the parameter and set the direction
   IDbDataParameter param1 = this.CreateParameter("@result", 0);
   param1.Direction = ParameterDirection.Output;

   // Call the stored procedure and pass the parameter
   IDbCommand cmd;
   this.ExecSprocScalar("OutputParamTest", out cmd, param1);

   // Retrieve the value from the command object
   IDbDataParameter param = (IDbDataParameter)cmd.Parameters["@result"];
   int x = (int)param.Value;
How do I pass the second parameter into
this.ExecSprocScalar("OutputParamTest", out cmd, param1);
?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Next
Reply
Map
View

Click here to load this message in the networking platform