SQLite Database Encryption Issue

SQLite Database Encryption Issue

This article is for dotConnect for SQLite.

When working with SQLite databases in applications built with dotConnect for SQLite, built-in encryption may fail to work. This usually happens either because of edition limitations or because the wrong version of the SQLite library is being used. The instructions below describe the requirements and configuration needed for encryption to function correctly.

Edition requirement

Built-in encryption support is available only in the Professional Edition of dotConnect for SQLite. If you are using another edition, encryption will not be available.

Correct SQLite library

The application must use the sqlite3.dll supplied with dotConnect for SQLite rather than the standard SQLite library.

To configure this:

1. In the current directory of your application, create two subfolders:
  1. x86
  2. x64
2. Copy the appropriate sqlite3.dll into these folders:
  1. x86: C:\Program Files (x86)\Devart\dotConnect\SQLite\sqlite3.dll
  2. x64: C:\Program Files (x86)\Devart\dotConnect\SQLite\x64\sqlite3.dll
This ensures that the correct library is used depending on the bitness of the application.