dotConnect Universal with sqlite-crypt

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for universal data access
Post Reply
magixxfactory
Posts: 12
Joined: Fri 27 Aug 2010 18:24

dotConnect Universal with sqlite-crypt

Post by magixxfactory » Sat 23 Nov 2013 09:03

Hello,
is it possible to use the provider of dotConnect Universal also with sqlite-crypt, by exchanging the sqlite3.dll ?
Thanks and regards
Uwe

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: dotConnect Universal with sqlite-crypt

Post by Pinturiccio » Mon 25 Nov 2013 14:23

Yes, it is possible. dotConnect Universal Professional is shipped with dotConnect for SQLite Standard edition which allows to work with SQLiteCrypt. You can use the following code for this:

Code: Select all

UniConnection conn = new UniConnection("Provider=SQLite; Data Source=database.db; Encryption=SQLiteCrypt; SQLiteCrypt License Key=00000-000-0000000-00000; FailIfMissing = false; password=best");
conn.Open();
This code creates a new database 'database.db', encrypted with SQLiteCrypt and having password 'best', or an already existing database, encrypted with SQLiteCrypt, is opened.

dotConnect Universal Professional Edition allows using the general ADO.NET functionality only. The UniConnection class does not have the ChangePassword method for changing database password. This means, dotCOnnect Universal does not allow changing database password or decrypting database.

magixxfactory
Posts: 12
Joined: Fri 27 Aug 2010 18:24

Re: dotConnect Universal with sqlite-crypt

Post by magixxfactory » Mon 25 Nov 2013 18:23

Thanks Pinturiccio , that sounds fine.
Regards
Uwe

magixxfactory
Posts: 12
Joined: Fri 27 Aug 2010 18:24

Re: dotConnect Universal with sqlite-crypt

Post by magixxfactory » Tue 26 Nov 2013 10:58

I still have a problem with this.

When I run the app on my development machine, my appication creates a non-crypted database if I run the app on another machine then it creates a crypted database.

On my development machine is not able to open a crypted database on the other machine it works.

It seems that on my development machine the orginal sqlite.dll is used and not the sqlite-crypt dll. I moved the sqlite-crypt dll into the the directory where the application (exe) is.

I also tried to change the sqlite.exe within the windows system directory but then the application is not longer able to access the databases (either the crypted or the uncrypted).

Is there anything I need to take care ?

Thanks and regards
Uwe

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: dotConnect Universal with sqlite-crypt

Post by Pinturiccio » Wed 27 Nov 2013 15:11

magixxfactory wrote:It seems that on my development machine the orginal sqlite.dll is used and not the sqlite-crypt dll.
dotConnect Universal works only with sqlite3.dll, so you have to rename sqlite-crypt dll to sqlite3.dll and place it to the application folder or to the Windows\System32 folder.

magixxfactory
Posts: 12
Joined: Fri 27 Aug 2010 18:24

Re: dotConnect Universal with sqlite-crypt

Post by magixxfactory » Fri 29 Nov 2013 09:21

Problem was, that only a 32bit DLL of sqlite-crypt was available, so it doensn't run on 64 Bit Windows. This is fixed now.
Thanks for your help.

Post Reply