Newbies Kai Benndorf Posted February 18, 2004 Newbies Posted February 18, 2004 Hi all, i'm using the JDBC driver from FileMaker together with Apache's Cocoon to build a web application. On updating my data i create a SQL statement containing a single quote in the new value, like the following: update "Produkt.fp5" set name='Thank's' It don't work, i receive a error message from FilemMaker. I tried to escape the single quote with '', ', %27, and some other, but i don't get it to work. I've found a similar thread in this forum, but without solution. Is there really no solution to this problem ? Many thanks in advance Kai
omiossec Posted February 24, 2004 Posted February 24, 2004 What is the error message you get ? update "Produkt.fp5" set name='Thank's' is your all statement ?
Newbies Kai Benndorf Posted February 27, 2004 Author Newbies Posted February 27, 2004 I don't have currently the exact error text at hand, but the error message was something about an incorrect SQL statement. The statement: update "Produkt.fp5" set name='Thank's' is only an simplified example, the real statements updates several additional fields.
conjur Posted March 1, 2004 Posted March 1, 2004 Well, first off, I realize that was an example by Thanks is not possessive. There is no need for a single quote in it. Another option is to use the back-tick ` instead of the apostrophe.
Newbies Kai Benndorf Posted March 1, 2004 Author Newbies Posted March 1, 2004 The values to be set in the database originated from a wen form and thus i can't prevent the user to type in an apostrophe. I've already implemented the exchange of the apostrophe with an backquote, but this is still incorrect. It#s not the data the user wants to write in the database
The Shadow Posted March 24, 2004 Posted March 24, 2004 I could be wrong, but I believe SQL-92 uses two single quotes together to put a literal quote in a string: (with two single quotes, not a double-quote ) Try: update "Produkt.fp5" set name='Thank''s'
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now