On 12/29/06, Michael Hooker <[EMAIL PROTECTED]> wrote:
I'm a fairly competent but amateur Delphi programmer and I can construct all
the SQL statements I need. But I'm having enormous trouble making
sqlite.exe work.
Can some kind person please tell me <exactly> what, right down to the last
dot and semi-colon, I should type in at the sqlite> prompt to open a SQLite3
database called "BaseStation.sqb" located in the same folder as sqlite and
then to get a simple SQL query like "select * from Aircraft" to come up with
some data on screen, or preferably save it to a disk file? Whatever I try I
get either a syntax error response or one saying that table Aircraft does
not exist. ..
ya, I've found getting to stuff from within the shell program tricky
at times. Here is the easiest way, esp. since your db is in the same
directory as the .exe (assuming that directory to be C:\sqlite3...
replace as needed)
C:\sqlite3\sqlite3.exe BaseStation.sqb
..
that will launch sqlite3 as well as open up your database all in one
command. Then you will get a sqlite prompt like so
..
SQLite version 3.3.8
Enter ".help" for instructions
..
well, go ahead an enter .help (you can also shorten it and enter .h).
It will spew out a list of dot commands that you can fool around with.
Of course, pure SQL would straightforward like so
..
sqlite> select * from Aircraft;
..
note that dot commands don't end with a semi-colon, while SQL
statements do. This allows you to enter SQL statements on multiple
lines like so, if you desire
..
sqlite> select
...> *
...> from
...> Aircraft
...> ;
Happy SQLiting.
--
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation https://edu.osgeo.org/
---------------------------------------------------------------------
collaborate, communicate, compete
=====================================================================
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------