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
SQL Update
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hi Warren,
Use the backslash to escape the single quote. You don't say which SQL flavour you use, but in the MySQL documentation, you'll find more information about escaping characters.
Best,
Mark
Use the backslash to escape the single quote. You don't say which SQL flavour you use, but in the MySQL documentation, you'll find more information about escaping characters.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode