Darren Duncan, dando pulos de alegria, escreveu :
That doesn't sound right. sqlite3_open() *should* return an error when
you try opening a 2.x database, citing that the file is not a SQLite
(v3) database file.
I already noticed this, but I think of it as a feature (but it should be
well documented).
The reason behind this is that no reads or writes from/to the database
take place until the first command is issued. That means you can open a
completely invalid database file, but only after the first select an
error will be returned (at least was how I noticed it was doing).
When creating a new database, only after the first write the file will
be written to (until then, the file will be 0 bytes).
I think of this as a design decision. Not one I agree fully, but it's
understandable.
Regards,
~Nuno Lucas