> I'd like to store any data as binary in my sqlite database, I approached
> the problem by trying to hex() the input because the x' ' operator accepts
> hex and outputs binary, for example:

You should convert you binary data into hex in your programming
language outside SQLite if you want to concatenate it into INSERT
statement. But better yet you should use sqlite3_bind_blob() function
which will allow you to bind your binary data as is without converting
to hex.


Pavel


On Fri, Nov 25, 2011 at 4:23 PM, Carl Desautels
<carlin.desaut...@senecac.on.ca> wrote:
> I'd like to store any data as binary in my sqlite database, I approached
> the problem by trying to hex() the input because the x' ' operator accepts
> hex and outputs binary, for example:
>
> x'hex("hello world")'
>
> but that syntax doesn't work, is there any way to make storing any data as
> its binary value possible?
>
> --
>
> Carl
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to