Getting started with Devart ODBC Driver for SQLite
To connect ODBC-compatible applications to SQLite, you need an ODBC driver and access to a SQLite database file.
Devart ODBC Driver for SQLite enables efficient connectivity between SQLite databases and your favorite BI, reporting, analytics, ETL, and database tools. ODBC-compliant applications can connect and access data without any additional client software. In Direct mode, the Driver works with SQLite database files without the SQLite client library.
This guide shows you how to install and activate the Driver, configure an ODBC data source (DSN), connect to SQLite using a DSN or connection string, and troubleshoot common connection issues.
Quick start: Connect to SQLite with ODBC
To connect to SQLite using the Devart ODBC Driver:
- Download and install the Driver for Windows, macOS, or Linux.
- Activate the Driver using your activation key, or continue with the 30-day trial. On Windows and macOS, take this step in the installer; on Linux, run the activator afterwards.
- Create an ODBC data source (DSN) and select Devart ODBC Driver for SQLite.
- Configure the connection by specifying the path to the SQLite database file and, for an encrypted database, the encryption key and algorithm.
- Use the DSN in your ODBC-compatible application to connect to SQLite and work with its data.
The following sections provide detailed installation and configuration instructions for each of the supported operating systems.
Prerequisites
Before you begin, make sure your environment meets the following requirements:
- Operating system: 32-bit or 64-bit Windows, including Windows Terminal Server; macOS (x64 or ARM64, including Apple silicon); Linux (32-bit or 64-bit).
- ODBC driver manager: Included with Windows. On macOS, install iODBC. On Linux, install unixODBC.
- Connection details: A SQLite 3 database file and read or write permissions for it. For an encrypted database, the encryption key and algorithm. To connect in Client Library mode instead of Direct mode, you need the SQLite3 client library.
- DSN configuration tool (optional): On macOS and Linux, you can use Devart ODBC Administrator to create and manage data sources through a graphical interface. The tool is distributed separately from the Driver and is available on the Devart website. Alternatively, configure data sources manually in the odbc.ini file.
- Activation key: A purchased version of the Driver requires an activation key. For evaluation purposes, you can use the trial version, which is valid for 30 days from the date of installation.
- Administrator rights: Required to install the Driver on all supported operating systems.
For a complete list of supported versions, operating systems, and third-party tools, see the ODBC Driver for SQLite compatibility page.
Install the ODBC Driver
Installing Devart ODBC Driver for SQLite is straightforward. All you need to do is download the package for your operating system and follow the installation instructions.
Install the Driver on Windows
1. Download the ODBC Driver for SQLite from the Devart website, open it, and click Next.
2. Read the License Agreement, select I accept the agreement, and click Next.
3. On the Select Destination Location page, keep the default folder or click Browse to choose another one, and click Next.
4. On the Select Components page, select the components to install, then click Next.
5. On the Select Start Menu Folder page, specify the folder for the Driver shortcuts. To skip creating a Start Menu folder, select Don't create a Start Menu folder. Click Next, then click Install.
6. On the License Information page, select Input activation key and enter your key. You can find it in the registration email or your Customer Portal. To open the Customer Portal, click Get Activation Key.
If the activation key is saved on your computer, click Load Activation Key and select the corresponding file.
To evaluate the Driver without a purchased key, select Trial evaluation.
7. Click Next, then click Finish to complete the installation.
Install the Driver on macOS
1. Download the ODBC Driver for SQLite PKG file from the Devart website and double-click the package to run it.
2. Run the installer and click Continue.
3. Read the license agreement, then click Agree.
4. On the Registration page, select Input activation key and enter your key, or click Load Activation Key and select the file that contains it. To evaluate the Driver without a purchased key, select Trial evaluation. Click Continue.
5. On the Installation Type page, click Install. To choose which components to install, click Customize first. When the installation finishes, click Close.
You can activate the Driver later from the Terminal: navigate to /Library/ODBC/Devart/SQLite and run the activator with your key.
Install the Driver on Linux
On Linux, the Driver requires the unixODBC driver manager, which must be installed separately. Follow the track that matches the package format of your distribution.
DEB-based distributions, such as Ubuntu and Debian
The commands below apply to Ubuntu 26.04 LTS, 24.04 LTS, and 22.04 LTS.
1. Install the unixODBC driver manager.
2. Download the DEB package for your architecture from the Devart website.
3. Open a terminal, navigate to the folder that contains the package, and install the package and its required dependencies.
4. Activate the Driver. Navigate to the folder where it is installed and run the activator with your key.
5. Verify that the Driver is registered.
The output should include [Devart ODBC Driver for SQLite].
Then verify that the DSN created during installation is registered.
The output should include the automatically created DEVART_SQLITE DSN.
RPM-based distributions, such as CentOS, RHEL, and Fedora
1. Install the unixODBC driver manager.
2. Download the RPM package.
3. Open a terminal, navigate to the folder that contains the package, and install the package and its required dependencies.
4. Activate the Driver. Navigate to the installation folder and run the activator with your key.
5. Verify that the Driver is registered.
The output should include [Devart ODBC Driver for SQLite].
Then verify that the DSN created during installation is registered.
The output should include the automatically created DEVART_SQLITE DSN.
Configure an ODBC data source
In this guide, you create a Data Source Name (DSN) for the ODBC connection and verify the connection details. A DSN stores connection settings, such as the path to the database file, the connection mode, and encryption settings that applications use to connect to SQLite. Applications can also connect without a DSN by passing the same parameters in a connection string.
Configure a DSN on Windows
1. In Windows Search, enter ODBC Data Sources and open the ODBC Data Source Administrator that matches the bitness of your application.
2. Go to the User DSN, System DSN, or File DSN tab, and click Add:
- User DSN — Available only to the user who creates it.
- System DSN — Available to all users on the computer.
- File DSN — Stores connection settings in a file that can be shared between computers where the required ODBC driver is installed.
3. In the Create New Data Source dialog, select Devart ODBC Driver for SQLite, and click Finish.
4. In the Devart ODBC Driver for SQLite Configuration dialog, enter a Data Source Name and an optional Description.
5. Specify the database to connect to. The Driver supports two connection options: Direct mode (default) and Client library mode.
Direct mode (default)
In Direct mode, the Driver connects to the database file directly, without the SQLite client library. If you choose this option, just provide the full path to the SQLite database file in the Database field.
Also, you can use a different Encrypt Algorithm for your connection and specify it in the settings in addition to the database path. Select the encrypt algorithm in the respective field and enter the encryption key. To store it in the DSN, select Save Key.
Client Library mode
In this mode, the Driver uses the SQLite3 client library installed on your computer. To connect, do the following:
- Clear the Direct checkbox.
- Provide the full path to the SQLite3 client library in the Client Library field.
6. Optional: Click Test Connection to verify the connection settings.
7. When the configuration is completed, click OK to save the DSN settings.
To configure the connection mode (for example, read-only access), journal mode, locking mode, busy timeout, and compatibility behavior, use the Advanced Settings tab of the same dialog. To create the database file on the first connection if it does not exist, select Force Create Database.
Configure a DSN on macOS
DSNs are managed in Devart ODBC Administrator, a graphical tool that is distributed separately from the Driver. Download and install it before you continue.
1. Open Devart ODBC Administrator (root), select the System DSN tab (recommended), and click Add. Enter your password when prompted.
2. In the Choose a driver dialog, select Devart ODBC Driver for SQLite and click OK.
3. In the Devart ODBC Driver for SQLite Configuration dialog, enter the Data Source Name and an optional Description. Then specify the connection settings for the necessary connection options.
Direct mode (default)
In Database, enter the full path to the SQLite database file, and keep Direct selected. If the database is encrypted, select the algorithm in Encrypt Algorithm and enter the key in the Encryption Key field.
Client Library mode
Clear Direct, and in Client Library, enter the path to libsqlite3.dylib (the SQLite3 client library on macOS).
4. Optional: Click Test Connection to verify the connection details. Then click OK to save the DSN settings.
Alternatively, edit the odbc.ini file directly. The installation creates a sample DSN named DEVART_SQLITE that you can adjust. Use /Library/ODBC/odbc.ini for a system-wide DSN or ~/.odbc.ini for a user-specific one. For an unencrypted database, omit the Encryption Key and Encrypt Algorithm lines.
[DEVART_SQLITE]
Driver=Devart ODBC Driver for SQLite
Direct=True
Database=your_sqlite_database_path
Encryption Key=your_encryption_key
Encryption Algorithm=your_encryption_algorithm
Save and close the file.
Configure a DSN on Linux
As on macOS, Devart ODBC Administrator is distributed separately from the Driver. Download and install it from the Devart website before you continue.
For DEB-based distributions:
For RPM-based distributions:
After installing the ODBC Administrator, proceed to configure a DSN.
1. Open Devart ODBC Administrator (root), select the System DSN tab, and click Add.
2. In the Choose a driver dialog, select Devart ODBC Driver for SQLite and click OK.
3. In the Devart ODBC Driver for SQLite Configuration dialog, enter the Data Source Name and an optional Description. In Database, enter the full path to the SQLite database file. If the database is encrypted, also select the algorithm in Encrypt Algorithm and enter the key in Encryption Key. To store the key in the DSN, select Save Key. To use the SQLite3 client library instead of Direct mode, clear Direct and specify the Client Library path.
4. Optional: Click Test Connection to verify the connection settings. When done successfully, click OK to save the DSN settings.
Alternatively, define the DSN in /etc/odbc.ini. The installation creates a sample DSN named DEVART_SQLITE that you can adjust. Use /etc/odbc.ini for a system-wide DSN or ~/.odbc.ini for a user-specific one. For an unencrypted database, omit the Encryption Key and Encrypt Algorithm lines.
[DEVART_SQLITE]
Driver=Devart ODBC Driver for SQLite
Direct=True
Database=your_sqlite_database_path
Encryption Key=your_encryption_key
Encryption Algorithm=your_encryption_algorithm
To verify the data source from a terminal, connect to it with isql, the command-line tool provided by unixODBC. Replace <your_dsn_name> with the name of your DSN.
Connect to SQLite using a connection string
In addition to using a DSN, you can connect to SQLite by specifying the connection parameters directly in an ODBC connection string. This type of connection is known as a DSN-less connection.
The following table summarizes when to use each connection method.
| Connection method | How it works | Best for |
|---|---|---|
| DSN | Stores the connection settings in a configured ODBC data source. Applications connect by specifying the DSN name. | Desktop applications, BI and reporting tools, and reusable connections configured on a client computer. |
| DSN-less | Specifies the Driver, the database file path, encryption settings, and other options directly in a connection string. No DSN needs to be created beforehand. | Applications, scripts, and automated deployments where connection settings are managed programmatically. |
Direct mode — Connect to a SQLite database file without the SQLite client library.
Encrypted database — Connect to a database encrypted by Devart products.
DRIVER={Devart ODBC Driver for SQLite};Direct=True;Database=myDatabaseFile;Encryption Algorithm=myAlgorithm;Encryption Key=myEncryptionKey
Client Library mode — Connect through the SQLite3 client library.
DRIVER={Devart ODBC Driver for SQLite};Direct=False;Database=myDatabaseFile;Client Library=myClientLibraryPath
Replace the placeholders with the full path to your database file and your actual connection settings. For Encryption Algorithm, use one of the following values: TripleDES, Blowfish, AES128, AES192, AES256, Cast128, or RC4. If a value contains a semicolon (;) or an equals sign (=), enclose it in braces.
You can also specify advanced connection parameters to configure the connection mode, journal mode, busy timeout, ODBC behavior, and other Driver settings. For the complete list of supported options, see SQLite ODBC connection string parameters.
Troubleshooting
If you cannot connect to SQLite through Devart ODBC Driver for SQLite, refer to the following list of common connection issues and their solutions to troubleshoot and fix the problem.
You get a "Product is not activated or has been deactivated" error
This error occurs when the Driver has not been activated or its activation is no longer valid.
- Windows: Open the DSN configuration dialog, go to the License tab, click Input Activation Key, and enter your activation key.
- macOS and Linux: In Devart ODBC Administrator, select the DSN and click Configure. On the License tab of the configuration dialog, click Input Activation Key and enter your activation key. Alternatively, run the sqliteodbcactivator utility from the Driver installation folder with your activation key.
After activation, test the connection again.
The ODBC data source is not found or the Driver is not available
If your application cannot find the DSN or Devart ODBC Driver for SQLite, check the application and Driver bitness.
A 32-bit application cannot use a DSN created in the 64-bit ODBC Data Source Administrator, and a 64-bit application cannot use a DSN created in the 32-bit administrator.
Make sure that:
- The DSN is created in the ODBC administrator that matches your application's bitness.
- The corresponding 32-bit or 64-bit version of the Driver is installed.
- The application is configured to use the correct DSN.
The Driver cannot open the database file
If the Driver cannot open the SQLite database, check the database path and file permissions:
- Make sure the Database field contains the full and correct path to the database file.
- Verify that the user account running the application has read permissions for the file, and write permissions for the file and its folder if the application modifies data.
- To create a new database file on the first connection, select Force Create Database on the Advanced Settings tab.
The Driver cannot connect to an encrypted database
If the database is encrypted, check the encryption settings:
- Verify that the Encryption Key is correct.
- Make sure that the Encrypt Algorithm matches the algorithm used to encrypt the database.
- Use Direct mode. The SQLite client library does not support encryption by default.
- Make sure the database was encrypted by a Devart product. Databases encrypted with other tools are not supported.
The client library cannot be loaded
In the Client Library mode, verify that the Client Library field contains the correct path and that the library bitness matches the Driver bitness. On macOS, place the library outside SIP-protected locations, for example, in /usr/local. Alternatively, select Direct to connect without the client library.
The database is locked
If another process holds a lock on the database file, the connection or query may fail. Close other applications that use the file, or increase Busy Timeout on the Advanced Settings tab. If several connections need to access the same file, set Locking Mode to Normal.
Additional resources
After you install and configure Devart ODBC Driver for SQLite, use the following resources to continue setting up and working with your connections:
- Connection string parameters — Browse the complete list of connection options for configuring encryption, connection mode, timeouts, ODBC behavior, and other Driver settings.
- Database encryption — Learn how to encrypt, decrypt, and change the encryption key of a SQLite database.
- Supported ODBC functions — Explore the currently supported ODBC functions.
- Using in third-party tools — Find step-by-step guides for connecting BI, reporting, analytics, and other ODBC-compatible tools to SQLite.
- Using from programming languages — Get examples of connecting to SQLite from Python, C#, C/C++, Go, Node.js, PHP, R, and Visual Basic.
- Documentation — Get full information on installing, configuring, and using Devart ODBC Driver for SQLite.