Subject | Re: [firebird-support] String literals syntax |
---|---|
Author | Helen Borrie |
Post date | 2008-08-25T21:25:59Z |
At 03:32 26/08/2008, you wrote:
./heLen
>HelloEnclose in single quotes.
>
>What is the syntax for string literals in Firebird 2.1.1 ?
>How do I escape non-printable characters in a string ?You don't. They are passed as whatever (bytes) they are. However, the apostrophe character inside a string literal must always be escaped by "doubling" it, e.g. 'O''Shaughnessy' (2 apostrophes).
>Where is it in the help ?'The Firebird Book' Ch. 11 P. 162; but it's SQL standard.
>I have some arbitrary strings in my application and I needYou'll need a routine at the client side that doubles apostrophes, such as the QuotedStr() function of Delphi.
>to update table rows with them.
>Also the UPDATE statement with query parameters do notNo, there is no such restriction. Explain what "do not work" means - what exception do you see?
>seem to work for me in embedded SQL, although for
>INSERT statements they seem to work. Could it be that
>UPDATE does not support query parameters in embedded
>SQL, but INSERT does ? ?
./heLen