On Tue, 4 Apr 2006, Roman wrote:
[...] I am using sqlite3 on am embedded platform. I am using c++ to
enter data. I have BLOB field, and I do not know how to enter hex values
from a data string. [...]
Hello,
if you need to put BLOB data verbatim into an SQL statement, SQLite3
supports syntax like
INSERT INTO blobs VALUES(X'deadbeef');
You just denote the BLOB as a string of an even number of hexadecimal
characters preceded by an 'X' or 'x'.
In many cases it may be a better idea, though, to put placeholders into
your SQL statement and to use sqlite3_bind_blob to load the BLOB data for
statement execution.
cu,
Thomas