troubleshooting Question

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

Avatar of accmats
accmats asked on
3 Comments3 Solutions1415 ViewsLast Modified:
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!!!

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros