Reputation: 19
Main Question:
When I was trying to connect to the encrypted SQLite database under .NET Framework 3.5, here is the error:
'SQL logic error Cannot use "Password" connection string property: library was not built with encryption support, please see "https://www.sqlite.org/see" for more information"
I've gone to https://www.sqlite.org/see to check out, but this website is to offer source code for SEE licensee, but that's not what I need, what I need is to use the DLL successfully.
The DLL I used is System.Data.SQLite (I downloaded "sqlite-netFx35-setup-bundle-x86-2008-1.0.113.0.exe" from Here.)
Is it possible to access encrypted SQLite db under .NET Framework 3.5?
Since I can successfully to do that with the same code under .NET Framework 4.5, so I know my code is OK(the code is showed below).
If it is possible, then what do I need to adjust?
The code I used:
conn = new SQLiteConnection("Data Source=MyDatabase.sqlite;Version=3;Password=password;");
conn.Open();
The reason that why I have to do this under .NET 3.5:
I have to change a database of an program to encrypted SQLite database. The program was written under .NET Framework 3.5, and the program can't be run under .NET 4.0 or even later version. And that makes me have to access encrypted SQLite database under .NET Framework 3.5.
What I've try:
I've search for the solution, but there are only comments telling that ".NET Core" cannot support access encryption SQLite. However, what I use is ".NET Framework" instead of ".NET Core".
I will be grateful to have your help :)
Upvotes: 1
Views: 974
Reputation: 36
From what I can tell, encryption was removed in recent versions of SQLite. A question was asked about the SetPassword and ChangePassword functions here.
I am using SQLite v1.0.111 in an older application with encryption working. Nuget Package. (Disclaimer about using outdated packages...)
If this is the case, it is unfortunate they stopped including encryption in the library by default, as it is a breaking change for existing applications.
Upvotes: 2