Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLite installation problems

Tags:

sqlite

I downloaded the binaries for windos for sqlite and extracted them. There were three files

  1. a shell

  2. dll

  3. analyzer

when I try to run to create a database and a table from the sqlite shell i get....

  SQLite version 3.7.8 2011-09-19 14:49:19
  Enter ".help" for instructions
  Enter SQL statements terminated with a ";"
  sqlite> sqlite3 test.db
  ...> create table tbl1(one varchar(10), two smallint);
  Error: near "sqlite3": syntax error
  sqlite>

when I try to run to create a database and a table from the command line(Vista) shell I get....

Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\codenamejupiterx>sqlite3 test.db
'sqlite3' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\codenamejupiterx>

does anyone have any ideas?????

like image 217
codenamejupiterx Avatar asked Sep 09 '26 15:09

codenamejupiterx


1 Answers

There is no "installation".

The error is that "sqlite3.exe" was not found in the search path as defined by the (Windows) PATH environment variable. Either add it to %PATH% (see How do I set or change the PATH system variable?) or use a complete file qualification that does not rely on %PATH%. A fully qualified invocation may look like:

C:\path\to\sqlite\sqlite3.exe test.db

Running sqlite3 by "double clicking" the executable in Windows Explorer is the same as above [as it uses an absolute path to run the sqlite3 executable] -- albeit without the ability to specify the database name or other options. (These can be specified in a "shortcut" to sqlite3, if desired.)

Happy coding.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!