Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling Stored Procedure with two parameters
Message
De
12/10/2010 14:37:47
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Calling Stored Procedure with two parameters
Divers
Thread ID:
01485066
Message ID:
01485066
Vues:
103
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform