On Sun, 1 Oct 2006, George Herson wrote:
I downloaded sqlite3.exe (as sqlite-3_3_7.zip) today onto WinXP Home,
created a couple (non-temp) tiny test tables with it, entered .exit, ran
sqlite3.exe once again, and found that those oh-so-promising electric
charges had apparently been unintentionally bequeathed to the bit bucket.
I.e., I turned out my pockets, checked a few directories, and found no
tables (except an empty sqlite_master). Did I in fact lose the tables?
How do I save next time?
George,
Well, Microsoft does it's own thing. Regardless, you're not clear enough
with what you did.
Did you start sqlite3 with the name of a database, including the .db
extension?
Here -- on linux, of course -- if I type:
$ sqlite3
sqlite> .databases
seq name file
--- --------------- ----------------------------------------------------------
0 main
You see that there's nothing there.
When I type
$ sqlite3 testing
sqlite> .databases
seq name file
--- --------------- ----------------------------------------------------------
0 main /data1/eikos/testing
and I see that sqlite3 has created an empty file for me in the current
directory.
But, when I want to open an existing database I type
$ sqlite3 testing.db
and I see
sqlite> .tables
category hedge noisewds rule_token variable
component importance pairs rules voting
fuzzyset model policy subpolicy
So, when you start sqlite3, pass it the name of a database (with the .db
extension); if that database does not exist it will be created. Then when
you create tables, they'll automagically be part of the named database's
schema.
HTH,
Rich
--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc.(TM) | Accelerator
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------