Robert Bielik <[EMAIL PROTECTED]> wrote: > I'm using the ODBC driver for SQL and I want to create a SQLite 3 db > from scratch, i.e. open a transaction, use DDL to create > tables and inserts to insert data into the tables, then commit. It seems > to work (i.e. a file is created and it has a reasonable size). > However, when trying to open the database in SQLiteSpy it fails to show > any tables or data. What has gone wrong? I thought the creation only > involved: > > 1. sqlite3_open > 2. Execute some SQL (CREATE/INSERT/COMMIT) > 3. sqlite3_close > > I can't see much room for errors. The odd thing is that I have no > problem in updating data (via the ODBC driver) in a db already > created in SQLiteSpy. >
If a database is created using SQLite version 3.3.x then it cannot be read using SQLite version 3.2.x unless 1. You compile SQLite version 3.3.x with -DSQLITE_DEFAULT_FILE_FORMAT=1 or 2. You do "PRAGMA legacy_file_format=on" prior to creating any tables. -- D. Richard Hipp <[EMAIL PROTECTED]>