Reputation: 11768
I am using ZeosDB component to access sqlite database. It works fine on an unencrypted db.
On a encrypted db i receive : file is encrypted or not a database. Eaven if I set the password.
Is the DLL file I use wrong ? I use the last dll from the official page.It does not support encryption by default ?
Upvotes: 0
Views: 3467
Reputation: 43033
There are several encryption schemes on SQLite3.
Among them, you have:
sqlite3.dll
so it will help making your deployment and support easier - it features easy switch to MS SQL, Oracle or OleDB/ODBC with the same source code from Delphi 5 up to XE3 and has great speed;ZeosDB SQLite3 level handle none of them.
The SQlite3 API driver (unit ZPlainSqLiteDriver) does not contain the cyphering. So you will have to change it. Or switch to another wrapper which support encryption APIs.
Upvotes: 4
Reputation: 2488
Recently I had the same problem (using UniDac). The official DLLs do not support encryption. There are a couple of libraries that include encryption, but they are not interchangeable. I.e. DB encryped with one SQLite DLL cannot be decrypted with the other distribution. I think your case is the same.
My solution was:
This way DBMS encrypts using the new DLL, and your program can decrypt it using the same version of the DLL.
You can also take a look at:
Notes:
Upvotes: 3