On 3/19/06, Tito Ciuro <[EMAIL PROTECTED]> wrote:
> Hi John,
>
> On 19/03/2006, at 18:23, John Stanton wrote:
>
> > Tito Ciuro wrote:
> >> Hello,
> >> I'm trying to store a string and I get the following error:
> >> unrecognized token: \"!\"\"
> >> This happens with SQLite 3.2.7
> >> Any ideas?
> >> Thanks,
> >> -- Tito
> > What is the string?
>
> If I escape single quotes (that is, from "'" to "''"), then
> everything is fine. I usually do that when I want to query for a
> value that contains a quote (i.e. O'Rourke).
>
> However, why do I have to manipulate the string value to be stored?
> Shouldn't SQLite allow me to store any string I want?

If you use the functions to bind values instead of constructing sql
you don't have to escape the string.

http://sqlite.org/capi3ref.html#sqlite3_bind_text

Reply via email to