SQLite Forum

tcl / db eval error
Starting SQL with a commet fails. Would be create to have 
db eval -- $sql {..}
"--" as end of options.


This code fails.
package require sqlite3

file delete ./testdb
sqlite3 db1 ./testdb
db1 eval {CREATE TABLE t1(a int, b text)}
db1 eval {INSERT INTO t1 VALUES(1,'hello')}
db1 eval {INSERT INTO t1 VALUES(2,'goodbye')}
db1 eval {INSERT INTO t1 VALUES(3,'howdy!')}

lappend sql "-- This is a comment"
lappend sql "SELECT * FROM t1 ORDER BY a"

db1 eval [join $sql \n] values {
        parray values
        puts ""