Link to home
Start Free TrialLog in
Avatar of mitesh114
mitesh114

asked on

passing through more than one parameter to a stored procedure.

how do you accept multiple stored procedure parameters at the same time? I have the following code:

SqlParameter myParm1 = myCmd.Parameters.Add("@Parameter1", System.Data.SqlDbType.VarChar, 20);
myParm1.Value = "string";

I want to be able to pass more than one value through to the stored procedure
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

What version of .NET are you using?

2005 has this form:
    myCmd.Parameters.AddWithValue("@Parameter1", "string");

Bob
Avatar of mitesh114
mitesh114

ASKER

i'm not using that version. I'm using the previous one.
myCmd.Parameters.Add("@Parameter1", "string");

Andrew
ASKER CERTIFIED SOLUTION
Avatar of REA_ANDREW
REA_ANDREW
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial