Posted to tcl by mjanssen at Wed Aug 29 09:27:44 GMT 2007view pretty

package require sqlite3
sqlite3 db c:/temp/db.sql
db eval {create table test(i integer, t blob)}
for {set i 0} {$i < 10000} {incr i} {append in [binary format c [expr {int(rand() * 256)}]]}
db eval {INSERT INTO test VALUES(1,$in)}
db eval {INSERT INTO test VALUES(1,@in)}
string length $in ; # fill stringrep
db eval {INSERT INTO test VALUES(1,$in)}
db eval {select t from test} {} {puts [string equal $t $in]}