Groups | Search | Server Info | Login | Register
Groups > comp.lang.tcl > #55615
| From | undroidwish <undroidwish@googlemail.com> |
|---|---|
| Newsgroups | comp.lang.tcl |
| Subject | Re: sqlite3 blob wrong |
| Date | 2026-03-23 12:27 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <10pr83s$3e5f$1@dont-email.me> (permalink) |
| References | <1774012017-4652@newsgrouper.org> <10pjl58$1l1e1$1@dont-email.me> <1774250910-4652@newsgrouper.org> |
On 3/23/26 08:28, rene wrote:
> ...
> Here is a working script. The problem is the same.
>
> ::sqlite3 ::d :memory:
> set f [::open t.png r]
> ::fconfigure $f -translation binary
> set c1 [::read $f]
> ::close $f
> ::d eval {create table t1(i integer, c BLOB);}
> ::d eval {insert into t1 values(1,$c1)}
> set c2 [::d eval {select c from t1 where i=1}]
The select statement returns a result set (a list with zero to
many elements), thus change the last line to
set c2 [lindex [::d eval {select c from t1 where i=1}] 0]
HTH,
Christian
Back to comp.lang.tcl | Previous | Next — Previous in thread | Next in thread | Find similar
sqlite3 blob wrong rene <user4652@newsgrouper.org.invalid> - 2026-03-20 13:06 +0000
Re: sqlite3 blob wrong Rich <rich@example.invalid> - 2026-03-20 14:21 +0000
Re: sqlite3 blob wrong rene <user4652@newsgrouper.org.invalid> - 2026-03-23 07:28 +0000
Re: sqlite3 blob wrong Ralf Fassel <ralfixx@gmx.de> - 2026-03-23 09:53 +0100
Re: sqlite3 blob wrong rene <user4652@newsgrouper.org.invalid> - 2026-03-23 11:19 +0000
Re: sqlite3 blob wrong Ralf Fassel <ralfixx@gmx.de> - 2026-03-23 16:06 +0100
Re: sqlite3 blob wrong Rich <rich@example.invalid> - 2026-03-23 16:23 +0000
Re: sqlite3 blob wrong Ralf Fassel <ralfixx@gmx.de> - 2026-03-23 19:32 +0100
Re: sqlite3 blob wrong undroidwish <undroidwish@googlemail.com> - 2026-03-23 12:27 +0100
Re: sqlite3 blob wrong rene <user4652@newsgrouper.org.invalid> - 2026-03-23 12:42 +0000
csiph-web