Page 1 of 1

dotConnect Universal with sqlite-crypt

Posted: Sat 23 Nov 2013 09:03
by magixxfactory
Hello,
is it possible to use the provider of dotConnect Universal also with sqlite-crypt, by exchanging the sqlite3.dll ?
Thanks and regards
Uwe

Re: dotConnect Universal with sqlite-crypt

Posted: Mon 25 Nov 2013 14:23
by Pinturiccio
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.

Re: dotConnect Universal with sqlite-crypt

Posted: Mon 25 Nov 2013 18:23
by magixxfactory
Thanks Pinturiccio , that sounds fine.
Regards
Uwe

Re: dotConnect Universal with sqlite-crypt

Posted: Tue 26 Nov 2013 10:58
by magixxfactory
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

Re: dotConnect Universal with sqlite-crypt

Posted: Wed 27 Nov 2013 15:11
by Pinturiccio
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.

Re: dotConnect Universal with sqlite-crypt

Posted: Fri 29 Nov 2013 09:21
by magixxfactory
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.