1 (edited by shaikhmujaahid 2019-11-18 07:21:25)

Topic: Protection for sqlite.db

please tell me how I protect sqlite.db file so no one can edit or open SQLite.DB file in any third application.

[img]C:\Users\mujeeb\Desktop\protect sqlite.png[/img]

DB Browser for SQLite this application can open sqlite.db file and end-user can change and edit our protected data which I don't want to make accessible that file please tell me how I protect . I am using the demo version.

2 (edited by ehwagner 2019-11-19 20:32:25)

Re: Protection for sqlite.db

You can provide the following SQL statements inside your project to protect your SQLite.db. Only third-party apps which solicits the password will have access to the DB.


SQLExecute('PRAGMA key = ''PASSWORD'';');      // To provide the password to a database

SQLExecute('PRAGMA rekey = ''PASSWORD'';');   // To assign or change the password of the database

SQLExecute('PRAGMA rekey = '''';');      // To remove the password of the database

3 (edited by shaikhmujaahid 2019-11-20 08:07:38)

Re: Protection for sqlite.db

Thanks for replay

I tried but isn't work for me
PFA with sample and screenshot

Post's attachments

Attachment icon dbPwdNotWord.JPG 140.56 kb, 3 downloads since 2019-11-20 

Re: Protection for sqlite.db

MVD doesn't support encryption, you should use another sqlite.dll library to use PRAGMA KEY
https://www.zetetic.net/sqlcipher/

Dmitry.

Re: Protection for sqlite.db

i need one sample please provide if available,Thanks

Re: Protection for sqlite.db

I can't provide an example, because I don't have a license for sqlcipher.


You should just place this line
SQLExecute('PRAGMA key = ''PASSWORD'';');


between begin end.   at the end of script, like this


begin
   SQLExecute('PRAGMA key = ''PASSWORD'';');
end.
Dmitry.

Re: Protection for sqlite.db

shaikhmujaahid

Forgot to mention that you need a special dll for this to work. You can download the following sqlite3.dll, which was posted here in the forum. Place this downloaded dll in your project folder. It will replace the existing dll. If you also place it in the main MVD program folder, it will automatically use it for all projects.


Here is the link for the download:  https://www.dropbox.com/s/k831y7goyc5dj … 3.dll?dl=0

Re: Protection for sqlite.db

Thank u so much it's working ur real life ginny.

Post's attachments

Attachment icon Done.JPG 58.41 kb, 2 downloads since 2019-11-23