Alexander Lamb <[EMAIL PROTECTED]> wrote:
> Hello list (I am new but searched a bit before posting).
> 
> I am trying to convert an Access database on WindowsXP to an SQLite  
> database to be used in a CoreData application on MacOSX (BTW, this  
> task seems so generic and would help so much in transfering legacy  
> Access apps to MacOSX I am surprised to not have found anything  
> related).
> 
> Here is what I did:
> 
> 1) I created an ODBC datasource for my Access database
> 2) In installed SQLite (the .exe, the dll and .ref all in a same  
> directory)
> 3) I created an SQLite database from the command line and created a  
> table (to force the creation of the file)

Either (1) use the latest version of SQLite from CVS or (2)
run

   PRAGMA legacy_file_format=ON;

prior to creating that first table in the SQLite database.  You
are probably creating the database with 3.3.6 on windows then
trying to read it with 3.1.3 on Mac.  A database created by 3.1.3
can be read and written by 3.3.6 (backwards compatible) but a
database created by 3.3.6 cannot be read or written by 3.1.3
(not forwards compatible).

The revised file format introduced in 3.3.0 has caused so much
grief that it will be turned off by default in the next release.
The revised file format gives the capability of using DESC indices.
In the future, if you want DESC indices, you have to run a pragma 
to turn the on prior to creating the database.


> 4) I created an ODBC datasource for my SQLite database
> 5) I selected one by one each Access table (in Access) and did an  
> "export..." to my SQLite datasource
> 
>  From the command line, I see the SQLite database is correctly filled  
> with my database.
> 
> 6) I copy the file to my MacOSX machine
> 7) From the command line, I see I can't open the database
> 
> I did the test with two versions of SQLite on Windows: with the 3.3  
> it doesn't work (which seems more or less normal according to the  
> documentation).
> However, with version 2.8, the mac can't read the file. The error is:
> 
> Error: file is encrypted or is not a database
> 
> I looked and the history of versions on the documentation pages of  
> SQLite and they mention needing a reload. But that would meand I have  
> to install SQLite 2.8 on MacOSX. Is that correct and if it is is  
> there an easy package to do so?
> 
> Thanks,
> 
> Alex
> --
> Alexander Lamb
> [EMAIL PROTECTED]


Reply via email to