SQLite 2.8 and SQLite 3.0 can peacefully coexist. They can even be linked together into the same binary.
I have just done this for inclusion in the next version of the SQLite DB Browser, and it works great. The only problem is how to identify the file format when I open a new file, is there a way?
When I open a SQLite 2.8.x db with sqlite3_open() I do not get any errors. I can even call sqlite3_exec() on it with some pragma commands, no errors returned.
However when I attempt to retrieve more info (the table structure) I get error code 26, the error message explains that the db is encrypted or malformed.
Is there a way to detect that I am opening a 2.8.x db? I guess I could read the signature from file, but I was hoping maybe for an error message in sqlite3_open. Not really critical but would be nice to have, and in this way we could offer to convert automatically to the new format (by doing a dump to a temp file followed by an import to a new db).
Regards, Mauricio