User Tools

Site Tools


code:open-source:hse-db:db-sqlite

04 DB-SQLite

Configuration

found in the HSE unit configuration directory in DB_CONNECTOR.ini.

  [global]
  filepath = "/path/to/database-file"
  dllpath = "/path/to/dll"
  timeout = 500

Resources

The SQL Toolkit needs to find some .dll files in the support directory. When running an executable, make sure to have a folder data configured under the application directory.

Configure Support directory in Build Spec

The SQLite Exensions have to be stored in Application Directory/data

SQLite Encryption

The DB_CONNECTOR was successfully tested with encryption provided by sqlcipher. As an example, the following steps were needed:

  1. download & extract zip file https://sqlitebrowser.org/
  2. create copies of sqlcipher.dll, libssl-1_1.dll, libcrypto-1_1.dll
  3. add key dllpath in DB_CONNECTOR.ini to tell the module to use the sqlcipher.dll
  4. call PRAGMA key = 'passphrase'; with a query-request right after starting the module, before creating a .db file or using it

For more information about the SQLCypher API see https://www.zetetic.net/sqlcipher/sqlcipher-api/.

example of DB_CONNECTOR.ini

dllpath="C:\LabVIEW\sqlCipher\sqlcipher.dll"

Important: Every Config Section used with a DB_Connector initialized with DB-Engine DB-SQLite have to define the same dllpath The DB_CONNECTOR does NOT support the use of two dlls simultaneously. If you use the sqlcipher.dll for one clone, you have to use it for every clone. So either don't specify dllpath at all to use the standard-SQLite-dll, or specify the sqlcipher.dll in every config section which is used by a DB-SQLite engine.

code/open-source/hse-db/db-sqlite.txt · Last modified: 2023/02/13 14:23 by alexander.elbert