Why can't I connect to encrypted sqlite database file?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
habipoguz
Posts: 14
Joined: Wed 20 Jan 2016 14:16

Why can't I connect to encrypted sqlite database file?

Post by habipoguz » Wed 01 Jan 2020 17:57

Hello everyone,
I encrypt my sqlite database file and set its password to 123 as follows.

Code: Select all

var conn = new SQLiteConnection("Data Source=Encrypted.db;Version=3;");
conn.Open();
conn.ChangePassword("123");
I don't get an error when I try to connect to the encrypted sqlite database file as follows. So I think that there is no error in database encryption.

Code: Select all

var conn = new SQLiteConnection("Data Source=Encrypted.db;Password=123");
conn.Open();
I want to create a Devart LinqConnect Model for this database file. I tried two different ways to do this, as I share the screenshots below.
Image
-
Image
How do I create a Devart LinqConnect Model?
Yours truly.

habipoguz
Posts: 14
Joined: Wed 20 Jan 2016 14:16

Re: Why can't I connect to encrypted sqlite database file?

Post by habipoguz » Tue 07 Jan 2020 03:57

Can you help me, please? I can't go back to the project because I can't do it ...

Shalex
Site Admin
Posts: 9046
Joined: Thu 14 Aug 2008 12:44

Re: Why can't I connect to encrypted sqlite database file?

Post by Shalex » Thu 09 Jan 2020 20:45

dotConnect for SQLite supports SEE, CEROD, SQLCipher, and SQLiteCrypt encryption extensions.

The Encryption connection string parameter determines the encryption SQLite extension to use. Note that if you want to use encryption mode other than "None" (which means no encryption - the Password value is ignored), you need to buy the corresponding extension separately and compile the SQLite engine with it. For example:
* https://www.devart.com/dotconnect/sqlit ... ipher.html
* https://www.devart.com/dotconnect/sqlit ... Crypt.html

Did you replace sqlite3.dll shipped with the provider installation with sqlite3.dll that supports CEROD?

x86 version
* C:\Program Files (x86)\Devart\dotConnect\SQLite\sqlite3.dll
* C:\Windows\SysWOW64\sqlite3.dll

x64 version
* C:\Program Files (x86)\Devart\dotConnect\SQLite\x64\sqlite3.dll
* C:\Windows\System32\sqlite3.dll

habipoguz
Posts: 14
Joined: Wed 20 Jan 2016 14:16

Re: Why can't I connect to encrypted sqlite database file?

Post by habipoguz » Mon 13 Jan 2020 04:35

Thank you so much. I'm sorry for the late reply. I am currently writing my doctoral dissertation. I'il answer as soon as possible. I hope I don't have a problem.

Post Reply