Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am using 2.0 version of Dotnet

I know how to use stored procedure in C#.
But I don't know how to pass parameters in stored procedure using C#


SQL
exec proc_sp 'Jack',1234567895,'M'



Please help me to get rid of this problem
Posted
Comments
Thanks7872 30-May-14 2:56am    
Do you have access to google.com?

 
Share this answer
 
use
command cmd;
cmd.parameter.add("@varname",datatype,size).value=Your value;

accept it if its work for you
 
Share this answer
 
Take a look at this article SQL Injection Attacks and Some Tips on How to Prevent Them[^] under parameterized Procedures
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900