Re: [sqlite] read/write binary data via tcl

2017-11-21 Thread rene
-readonly is it. Sorry for the noise. -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] read/write binary data via tcl

2017-11-21 Thread rene
Getting binary data back with incrblob is only possible with a writeable database connection. Is there a way to do this with a readonly database connection? Thank you rene -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing

Re: [sqlite] read/write binary data via tcl

2017-11-20 Thread rene
Found a solution:) May be it could be included in the tcl interface specification as well. package req sqlite3 sqlite3 db :memory: db eval {create tanle img(b blob)} # save data set fd [open test.png r] fconfigure $fd -translation binary set c1 [read $fd] close $fd db eval {insert into img

[sqlite] read/write binary data via tcl

2017-11-20 Thread rene
Hi all, I try to read/write image files in tcl with sqlite. I would like to keep it simple and not convert to/from base64. 1. write the image: package req sqlite3 sqlite3 db test db eval {create table img(data blob)} set fd [open t.png r] fconfigure $fd -translation binary set c [read $fd]