It appears that SQLite 3 doesn't
actually do anything until a table
is created. Try this:

sqlite3 db
SQLite version 3.2.1
Enter ".help" for instructions
create table x (y);
drop table x;
.quit

>>> [EMAIL PROTECTED] 6/6/2005 9:31:26 AM >>>
I don't seem to get that. Maybe you're using an old version.

[EMAIL PROTECTED]:~> ls db
ls: db: No such file or directory
[EMAIL PROTECTED]:~> touch db
[EMAIL PROTECTED]:~> ls -s db
0 db
[EMAIL PROTECTED]:~> sqlite3 db
SQLite version 3.2.1
Enter ".help" for instructions
sqlite> select * from sqlite_master;
sqlite> .quit
[EMAIL PROTECTED]:~> ls -s db
0 db
[EMAIL PROTECTED]:~> sqlite db
SQLite version 2.8.15
Enter ".help" for instructions
sqlite> select * from sqlite_master;
sqlite> .quit
[EMAIL PROTECTED]:~> ls -s db
0 db



--- Marco Bambini <[EMAIL PROTECTED]> wrote:

> What is the best way to create an empty sqlite3 database?
> I mean without tables and rows inside it.
> 
> The problem is that if I create a 0 length file, when I try to open 

> it with sqlite3_open I get the error "file is encrypted or is not a 

> database".
> Maybe a possible solution could be to manually write the SQLITE3  
> header into the file, but is it safe?
> 
> Thanks,
> Marco Bambini
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to