Menu

sqlite3 package on windows

Nigel Lee
2024-12-30
2025-01-08
  • Nigel Lee

    Nigel Lee - 2024-12-30

    I downloaded the tcl86 windows install, and have tried the tclkit runtime, and both have worked OK so far, with simple tcl and some tk widgets to create Windows 'apps', but when I wanted to try using sqlite3, although the tcl shell works with sqliite3 commands to creae/open, create tables, insert data and 'select' results, I get an error when trying to use sqlite3, or "package require swlite3"!
    There's a Tcl86\lib folder "sqlite3.45.2", which has a "packageindex.tcl" file, but tring to use tclsh or the tclkit-gui.exe to run the tcl code, works..
    The tcl documentation I've seen either mentions the "sqlite3 package", or tdbc::sklite3, which doesn't seem to work, either..
    Any ideas?

     
  • Ashok P. Nadkarni

    Please clarify which specific version of the installer and platform (x86 or x64).

    I also do not understand the issue you are reporting. What is the exact error message and content of $::errorInfo? You say sqlite3 commands like create tables and insert work with the tcl shell and then say "error trying to use sqlite3" but then also say "trying to use tclsh or tclkit-gui to run the tcl code, works". So I am confused about exactly which commands do not work and with which program?

     
  • Nigel Lee

    Nigel Lee - 2024-12-31

    I downloaded tcl-8.6.14-installer-1.14.0-x64.msi which includes tclsh, the tk shell, and interpreter.
    I try out commands using the shell, then started with some sample code and adapted it to try out topics from a couple of tutorials I found online (although some of the code examples are old)
    I could run my tcl files from the windows command prompt, as parameters to tclsh, and then downoaded tclkit-gui-8_6_3-twapi-4_0_61-x86-max.exe to try out the mechanism before copying the files onto another PC. I started trying out TK widgets, and 'grid' to create a graphical app, and then wanted to try out accessing a database - I downloaded sqlite3, and used the utility to create a smple database, then wanted to access it from tcll.
    Initially , the information I read only mentioned tdbc:: ccmmands, but that didn't work, and then I saw a mention of the sqlite3 commend - but the page about tcl on the sqlite website didn't mention a package. The tclshell allowed me to open the dababase and add, then select, records, but when I tried putting the same commands into a tcl file, I gotmy subsequent "eval" an error regading the sqlite3 commnd, and when I tried adding a "package requite sqlite3", that failed, too!
    the tclsh.exe is version 8.6.2.14
    The install folder (tcl86) has tcl86t.dll (v.8.6.2.14), and the lib folder has "sqlite3.45.2.
    one of the errors was "invalid command name 'sqlite3', then I got another error when I tried "package require sqlite3"
    (running on Win.10 pro 64-bit)
    It seems odd that I can type in the commands to the tcl shell window, but the same commands in a tcl source file produces errors.
    Because the sqlite3 command wasn't recognised, the subsequent 'eval' commands weren't reached..

     
  • Anonymous

    Anonymous - 2025-01-01
    Post awaiting moderation.
  • Nigel Lee

    Nigel Lee - 2025-01-08

    I saw there's a new download, and although it took a while for the installer to "initialise", it has now completed and my tcl code is working.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.