Link to home
Avatar of accmats
accmats

asked on

How to handle Apostrophe from text boxes when they are used with SQL statements

I have a website with an order entry form.  The customers have to type in the name, address, etc.  Some times their company name contains an Apostrophe.  When I read the text box and and write it to a string that becomses my SQL statment, it causes problems on the SQL side.  It thinks the Apostrophe is the end of the field.

How can I handle this?  How do I allow my customers to enter in Apostrophes that won't screw up sql.  Also I would rather not have to redo all my code and used stored procedures if there is another workaround.

Thanks for all your help!!!
ASKER CERTIFIED SOLUTION
Avatar of mrichmon
mrichmon

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.