Click here to Skip to main content
15,899,474 members
Please Sign up or sign in to vote.
1.33/5 (3 votes)
See more:
SqlCommand cmd = new SqlCommand("update studetails set  stunname = '" +srilatha+ "' where stuno = '" + 1 + "')", con);


how to solve that commnd tell me answer urjently
Posted
Updated 4-Jan-16 17:47pm
v2
Comments
Thilina Chandima 4-Jan-16 22:41pm    
what is srilatha varibal name or just the text with the actual name?
dan!sh 4-Jan-16 23:00pm    
You have probably mistaken the purpose of Q and A. Please read the guidelines on how to post a question here: http://www.codeproject.com/Articles/64628/Code-Project-Quick-Answers-FAQ
PIEBALDconsult 4-Jan-16 23:09pm    
Solve it by thinking and maybe doing some research.

1 solution

Google for "C# parameterized sql queries". Read up on why building an SQL query string using string concatenation is so bad and how to fix this.
 
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