Small. Fast. Reliable.
Choose any three.

This information is obsolete. You are looking at the CVSTrac source management system display for SQLite that was replaced by Fossil on 2009-08-11. The information shown here has not been updated since that cut-over. These pages are retained for historical reference only.

As of 2005-Sep-24, SQLite version 3 is included in ActiveTcl. And there is a TEA-compatible source tarball on the Download Page that installs SQLite correctly.
  • Create a directory called TclSqlite under the Tcl /lib directory.
  • Copy or move the TclSqlite library to the newly created directory.
  • From Tcl, execute: "pkg_mkIndex -direct <tcl>/lib/TclSqlite *.<ext>" where <tcl> is the path to the /lib directory and <ext> is the library extension (dll or so).

Once you've done this, you'll have a pkgIndex.tcl file in the TclSqlite directory. Tcl will use that file to automatically locate the package. Now all you have to do is use:

  package require sqlite


  package require sqlite 2


  package require sqlite 2.0

depending on how cautious you want to be--and assuming that you're using version 2 of the library! (The second and third choices are probably best in most cases. Use the first choice to find the most recent version you've installed.)

If you want to use tclSqlite with ActiveState Tcl under windows. All you need to do is "load" the .dll file

   load C:\\Tcl\\lib\\tclsqlite3.dll sqlite3
   sqlite3 db1 testdb
   db1 close

(I found this solution after a LONG search ... on the mailing list. The solution was given by Gerry Snyder. Thanks Gerry!)

This is not the cleanest install (and is very easy to break if you change the .dll location) but it works.