Re: [sqlite] From Windows file format to MacOSX (unsuccessfull, still)

2006-08-04 Thread Gerry Snyder

Alexander Lamb wrote:




Well, I even tried to insert a row in the table. The table contains 
the data. The file on the disk is 2K length. The PRAGMA commands tells 
me I am in legacy file format mode (1) but when I quit then 
return, I am back to 0!




I just tried the same thing and got the same result.

It is possible that the only problem is that the pragma is not returning 
the expected result, but is in fact changing the file format when used 
as directed.


Have you tried copying the file to your Mac to see whether it can be read?


Gerry, admittedly grasping at straws


Re: [sqlite] From Windows file format to MacOSX (unsuccessfull, still)

2006-08-04 Thread Alexander Lamb



Alexander Lamb uttered:


Well, sorry, but I did exactly that:

1) When I do the PRAGMA command the file is created (I can see it  
appearing in the explorer)
2) After the create table, if I do PRAGMA legacy_file_format; I  
indeed receive "1" as an answer.


However,

I ".quit" then go back into the database and ask PRAGMA  
legacy_file_format; it returns "0".


Once I quit, it "reverts" to 0??




The problem is that the file created is zero length until actual  
data (or meta-data) is inserted. Thus, you need to at least create  
a table. Then, once some data has been created, the header will  
contain the correct legacy_file_format information.




Well, I even tried to insert a row in the table. The table contains  
the data. The file on the disk is 2K length. The PRAGMA commands  
tells me I am in legacy file format mode (1) but when I quit then  
return, I am back to 0!


Could it be a wrong version of SQLite?

When I ask for the version I get 3.3.6

I simply installed the .exe and .dll from the Windows package I found  
on the web site.


Alex


Re: [sqlite] From Windows file format to MacOSX (unsuccessfull, still)

2006-08-04 Thread Christian Smith

Alexander Lamb uttered:


Well, sorry, but I did exactly that:

1) When I do the PRAGMA command the file is created (I can see it appearing 
in the explorer)
2) After the create table, if I do PRAGMA legacy_file_format; I indeed 
receive "1" as an answer.


However,

I ".quit" then go back into the database and ask PRAGMA legacy_file_format; 
it returns "0".


Once I quit, it "reverts" to 0??




The problem is that the file created is zero length until actual data (or 
meta-data) is inserted. Thus, you need to at least create a table. Then, 
once some data has been created, the header will contain the correct 
legacy_file_format information.



So, if I have to issue a PRAGMA legacy_file_format=ON; each time I enter 
sqlite, I have a problem when I access the database through ODBC. I have no 
way to issue that PRAGMA command!


Am I correct in my reasonning?
--
Alexander Lamb
[EMAIL PROTECTED]



On Aug 4, 2006, at 4:31 PM, [EMAIL PROTECTED] wrote:


Alexander Lamb <[EMAIL PROTECTED]> writes:


1.  (*) text/plain

Well, I am afraid it didn't work.

Somehow, the legacy_file_format info is not "sticky".

I did:

sqlite3

then in command mode:

PRAGMA legacy_file_format=ON;

then

ATTACH "d:\mydb.db" AS mydb;


In order to have done an ATTACH, the database had to have already existed.
That's too late.  Instead, ensure that mydb.db *does not exist*, and then 
do:


 sqlite3 d:\mydb.db
 PRAGMA legacy_file_format=ON;
 CREATE TABLE TEST (id INTEGER);

The next time you then access the file, it will have the proper format.

Derrell




--
/"\
\ /ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
 X   - AGAINST MS ATTACHMENTS
/ \


Re: [sqlite] From Windows file format to MacOSX (unsuccessfull, still)

2006-08-04 Thread Alexander Lamb

Well, sorry, but I did exactly that:

1) When I do the PRAGMA command the file is created (I can see it  
appearing in the explorer)
2) After the create table, if I do PRAGMA legacy_file_format; I  
indeed receive "1" as an answer.


However,

I ".quit" then go back into the database and ask PRAGMA  
legacy_file_format; it returns "0".


Once I quit, it "reverts" to 0??

So, if I have to issue a PRAGMA legacy_file_format=ON; each time I  
enter sqlite, I have a problem when I access the database through  
ODBC. I have no way to issue that PRAGMA command!


Am I correct in my reasonning?
--
Alexander Lamb
[EMAIL PROTECTED]



On Aug 4, 2006, at 4:31 PM, [EMAIL PROTECTED] wrote:


Alexander Lamb <[EMAIL PROTECTED]> writes:


1.  (*) text/plain

Well, I am afraid it didn't work.

Somehow, the legacy_file_format info is not "sticky".

I did:

sqlite3

then in command mode:

PRAGMA legacy_file_format=ON;

then

ATTACH "d:\mydb.db" AS mydb;


In order to have done an ATTACH, the database had to have already  
existed.
That's too late.  Instead, ensure that mydb.db *does not exist*,  
and then do:


  sqlite3 d:\mydb.db
  PRAGMA legacy_file_format=ON;
  CREATE TABLE TEST (id INTEGER);

The next time you then access the file, it will have the proper  
format.


Derrell