Re: using TCL with sqlite database...




"Jan Van Belle" <janvanbelle@xxxxxxxxx> wrote in message
news:ekhrcm$kjj$1@xxxxxxxxxxx
Hello all,

I'm trying to access an SQLite database via TCL.
Creating/opening/create tables etc. succeeds when doing it in 1 procedure,
but fails when I open the db in proc open_sqlite_db {} and try to write
to it in proc write_sql_db {}


You might need to commit the transaction for it to take effect if you keep
the DB open. Make a seperate proc to close the DB and then see if your data
is in the DB. I open the DB, run the query, and close the DB, each time so
I have never had this problem of data not being in the DB.

catch {
sqlite dbCmd $dataBase
dbCmd timeout 20000
set qryResult [dbCmd eval $query]
set errorCode [dbCmd errorcode]
dbCmd close
} catchResult

This is a useful link for Sqlite info.
http://www.sqlite.org/docs.html


.



Relevant Pages

  • Re: how to migrate request-tracker database from sqlite3 to mysql
    ... Is there a way to export data from sqlite so they can be ... rt-dump-database doesn't export sqlite database and sqlite and mysql ... databases for rt are not compatible even if I dump sqlite database into ... MySQL with its command-line tools. ...
    (Debian-User)
  • Re: randomly write to a file
    ... Consider using an SQLite database. ... It comes with Python 2.5 and higher. ... SQLite will do a nice job keeping track of the index. ... that a bit overkill? ...
    (comp.lang.python)
  • Re: how to migrate request-tracker database from sqlite3 to mysql
    ... Is there a way to export data from sqlite so they can be ... rt-dump-database doesn't export sqlite database and sqlite and mysql ... databases for rt are not compatible even if I dump sqlite database into sql ... It describes how to change database backend, bud rt-dump-database ...
    (Debian-User)