SQL Update
Posted: Fri May 01, 2009 7:08 pm
I am having a issue with a SQL Update when my variable has a single quote in the data.
ie. tDescriptionReview = It's a fascinating book
...the single quote in "It's" is causing my update to fail since I am using single quotes to surround by text fields. How would I get around this?
Here is how I am updating...
put "UPDATE books set description = " & "'" & tDescriptionReview & "'" & " where id = " & tID into tSQL
revexecutesql gConID, tSQL
Thanks!
Warren
ie. tDescriptionReview = It's a fascinating book
...the single quote in "It's" is causing my update to fail since I am using single quotes to surround by text fields. How would I get around this?
Here is how I am updating...
put "UPDATE books set description = " & "'" & tDescriptionReview & "'" & " where id = " & tID into tSQL
revexecutesql gConID, tSQL
Thanks!
Warren