Re: [sqlite] Re: Newbie - can't create database but I can attach

2007-06-05 Thread nvi
Thank you Igor, I appreciate your time!

I wasn't specific enough, here's what's happening in my DOS window...

---

SQLite version 3.3.17
Enter ".help" for instructions
sqlite> sqlite3 testdatabase //hard return
   ...> ; //hard return
SQL error: near "sqlite3": syntax error
sqlite>

---

I was following the example at http://sqlite.org/sqlite.html
(substituting testdatabase for ex1) and my experiences seem to deviate
from what I would expect.  

Also, I tried this, per your comment about needing a table first...

---

SQLite version 3.3.17
Enter ".help" for instructions
sqlite> sqlite3 testdatabase //hard return
   ...> create table tbl1(one varchar(10), two smallint); //hard return
SQL error: near "sqlite3": syntax error
sqlite>

---

I also continued with an 'insert' statement, before a semicolon, but to
no avail.

Is there a SQLite newbie group / further resource you'd recommend, I
hate wasting people's time.  








On Tue, 5 Jun 2007 13:54:50 -0400, "Igor Tandetnik"
<[EMAIL PROTECTED]> said:
> nvi-yMULe1UMIukeIZ0/[EMAIL PROTECTED] wrote:
> > Hello, thanks in advance, I've tried to answer this through extensive
> > searching.
> >
> > The following syntax does not create a database, e.g.;
> >
> > sqlite> sqlite3 testdatabase
> 
> SQLite defers creating the database file until you create the first 
> table.
> 
> > However, if I create a sqlite database with TkSQLite, sqlite.exe can
> > 'attach' to that test database, and, using the sqlite.exe command
> > '.databases', I can see that database, however, using '.tables'
> > doesn't show me the test table.
> 
> .tables command only shows tables in the main database. To see tables in 
> attached databases, use
> 
> select * from db.sqlite_master;
> 
> where 'db' is the name under which you attached the database.
> 
> Igor Tandetnik 
> 
> 
> -
> To unsubscribe, send email to [EMAIL PROTECTED]
> -
> 
-- 
  
  [EMAIL PROTECTED]


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Re: Newbie - can't create database but I can attach

2007-06-05 Thread Igor Tandetnik

nvi-yMULe1UMIukeIZ0/[EMAIL PROTECTED] wrote:

Hello, thanks in advance, I've tried to answer this through extensive
searching.

The following syntax does not create a database, e.g.;

sqlite> sqlite3 testdatabase


SQLite defers creating the database file until you create the first 
table.



However, if I create a sqlite database with TkSQLite, sqlite.exe can
'attach' to that test database, and, using the sqlite.exe command
'.databases', I can see that database, however, using '.tables'
doesn't show me the test table.


.tables command only shows tables in the main database. To see tables in 
attached databases, use


select * from db.sqlite_master;

where 'db' is the name under which you attached the database.

Igor Tandetnik 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-