SQLite Version: 2.8.17 (not 3)

I have a database that when I try to open it, either with the 'C'
libraries or with the sqlite.exe command-line utility, gives me the
error "file is encrypted or is not a database".

I opened the data file in a hex editor and noticed that the 48 byte
header string has been changed. The header string, which is supposed to
be "** This file contains an SQLite 2.1 database **" is instead, "**
This file contains an sqlite 2.1 database **".

The difference between the good and bad header is that the "SQL" in
"SQLite" is all lower case. If I change the lower case "sql" to "SQL",
the file opens and all data is intact!  Looking at the source code in
btree.c, line 794, the error returned is SQLITE_NOTADB when the
comparison fails, which is exactly the error that I am seeing reported.

What in the world could have caused this??

Thanks for any insight.

Richard

Reply via email to