A
Alex
Hi...
I have a stored procedure that takes in a large number of parameters (around
30) and returns (as output parameters) another 10 or so.
At the moment, each parameter is declared, defined and added in my C# code
as follows:
SqlParameter prmCustAcctID = cmd.CreateParameter();
prmCustAcctID.ParameterName = "@CustAcctID";
prmCustAcctID.SqlDbType = SqlDbType.NVarChar;
prmCustAcctID.Direction = ParameterDirection.Input;
prmCustAcctID.Size = 30;
prmCustAcctID.Value = strCustAcctID;
cmd.Parameters.Add(prmCustAcctID);
Multiply this by around 40, and you get a very long block of code!!!
Is there a better/faster/more improved way of doing something like this for
large numbers of parameters?
Thanks!
Alex
I have a stored procedure that takes in a large number of parameters (around
30) and returns (as output parameters) another 10 or so.
At the moment, each parameter is declared, defined and added in my C# code
as follows:
SqlParameter prmCustAcctID = cmd.CreateParameter();
prmCustAcctID.ParameterName = "@CustAcctID";
prmCustAcctID.SqlDbType = SqlDbType.NVarChar;
prmCustAcctID.Direction = ParameterDirection.Input;
prmCustAcctID.Size = 30;
prmCustAcctID.Value = strCustAcctID;
cmd.Parameters.Add(prmCustAcctID);
Multiply this by around 40, and you get a very long block of code!!!
Is there a better/faster/more improved way of doing something like this for
large numbers of parameters?
Thanks!
Alex