If I want to insert a statement which contains quotation mark, how is it possible ?
For Example I have a text box and I enter:
Future Swami Vivekananda’s grand father's name was "____" .
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you use properly parameterized statements, you shouldn’t need to worry about it. Something like this (though please don’t learn C# techniques from me):
(Though you really should be using stored procedures.)
If you are building your strings manually (which you really, really, really shouldn’t be doing), you need to escape string delimiters by doubling them up: