mohit gupta

mohit gupta

  • NA
  • 207
  • 1.5k

Is possible to add parameter to stored procedure using list

Feb 6 2014 2:59 AM
Is it possible to add parameter using list in c# to pass that parameters to a store procedure.
when we want to add parameter to store procedure we write a code
cmd. parameter .add ("@variablename",Value of that  variable)
but i have a table and in that table i have 5 columns and i have written a stored procedure for inserting value in a table.
 
 
 when i add the value with the help   of C# code as just i define above[cmd. parameter .add ("@variablename",Value of that variable)]
 
But My ques is that i do not want to add variable name in my   cmd. parameter .add ("Here i want to declare something as a index no. which identify what value  inserted in appropriate column",Value of that variable)
 
Can it possible in c# code
thanks in advance........................ 

Answers (2)