Are there escape characters for SQL?

G

Guest

I think it is a very simple question, but i don't know the answer. I am
developing a web site in C# and ASP.NET . If an entry like "Here is Sam's
Pub" is entered into a Textbox exception occurs. Since " ' " character causes
problem. Are there any escape character? Or how can i solve this problem?
 
G

Guest

basulasz,

One option is to replace the single-quote character with 2 single-quote
characters.

Another option is to supply the data as parameters to the sql statement.

I think that using parameters is the way to go whenever possible.

Kerry Moorman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top