Subject Re: [firebird-support] String literals syntax
Author Helen Borrie
At 03:32 26/08/2008, you wrote:
>Hello
>
>What is the syntax for string literals in Firebird 2.1.1 ?

Enclose in single quotes.

>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 need
>to update table rows with them.

You'll need a routine at the client side that doubles apostrophes, such as the QuotedStr() function of Delphi.


>Also the UPDATE statement with query parameters do not
>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 ? ?

No, there is no such restriction. Explain what "do not work" means - what exception do you see?

./heLen