Sorry for asking, but is there a read blob for this without binding?
At this moment i'm using ..GetTable() and seems to offer only null terminated strings.


----- Original Message ----- From: "Christian Smith" <[EMAIL PROTECTED]>
To: <sqlite-users@sqlite.org>
Sent: Wednesday, July 27, 2005 6:13 PM
Subject: Re: [sqlite] Sorry, trivail question probably, chr(0) in blob.


On Wed, 27 Jul 2005, Edwin Knoppert wrote:

I reread the faq hundred times but i don't understand the \000 remark.

For INSERT how can i embed BLOB data having single quote and chr(0) bytes?
Currently i replace all singlequotes with 2x single quotes and that works fine.
The chr(0) byte did not succeed.
I'm using the dll and don't do any c to prepare me the encoding call(s).
Afaik this one should be obsolete with v3.x anyway is it?


BLOBS can be inserted by using the form:
X'x1x2x3..xn'

Where:
x1..xn are two hex-digit representation of data.

eg.
sqlite> select X'48656c6c6f20576f726c6400';
Hello World
sqlite> select quote(X'48656c6c6f20576f726c6400');
X'48656C6C6F20576F726C6400'


You'll have to convert to the hex form yourself, as SQL appears to have no
way to quote NUL bytes within a string.


Thanks!


--
   /"\
   \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
    X                           - AGAINST MS ATTACHMENTS
   / \


Reply via email to