Reputation: 1255
We are having lot of SQLite databases (of version 2.X) in the Cent OS linux servers. Now there is a need to read those database content using java and do some operations on it.
I couldn't find sqlite jdbc compatible to this SQLite v2.X version.
If I try to use the latest jars available here (http://mvnrepository.com/artifact/org.xerial/sqlite-jdbc), I got this error,
Error :[SQLITE_NOTADB] File opened that is not a database file (file is encrypted or is not a database)
Where can I find jdbc driver jar for SQLite v2.X or is there any other work around for this ?
Upvotes: 0
Views: 264
Reputation: 180070
To convert a database file from SQLite 2 to SQLite 3, you can use the command-line shells of both versions to dump the database as SQL commands, and recreate it:
sqlite db2.sqlite .dump | sqlite3 db3.sqlite
There is no SQLite 2 driver for any modern language (except Perl and PHP).
Upvotes: 2