' interrupts string input

In a web application (uses ASP), users are asked to answer a question through a multiple-line input box. When using the ' char, as in "I'm", the input following to that gets ignored when storing the data in the database. I know the cause - but how can I prevent it from occuring?
ribbegrdAsked:
Who is Participating?
 
connexConnect With a Mentor Commented:
Just put the String you send to the SQL-Server in "<string>"
This should solve that.

0
 
ribbegrdAuthor Commented:
How exactly should this be done? My app reads stuff off a form, and then directly inserts it. Where should the <string> tag be?
0
 
connexCommented:
depends on how you construct the statement. Maybe email me some
sample code and I can send you back a version that does is.
My Email is us@datapec.datagroup.de

0
 
sybeCommented:
using the Replace function replace the ' with 2x '

REPLACE(Request.Form("field_whatever"), "'", "''")

But you can also URLEncode the string and URLDecode it back when you get the data from the database.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.