February 18, 200421 yr Newbies 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
February 24, 200421 yr What is the error message you get ? update "Produkt.fp5" set name='Thank's' is your all statement ?
February 27, 200421 yr Author Newbies 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.
March 1, 200421 yr 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.
March 1, 200421 yr Author Newbies 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
March 24, 200421 yr 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'
Create an account or sign in to comment