SQLite ODBC Driver: Install and Connect on Windows

Setting up a Windows connection to a SQLite database starts with installing its ODBC driver. The driver lets an ODBC application send requests to the SQLite database engine.

You’ll learn how to install the matching driver and connect a DSN to the database file, then how to address setup errors.

TL;DR: Install the SQLite ODBC driver

Install the driver that matches your application’s architecture, then point a DSN at the SQLite file’s full path.

  • Download the Windows installer from the SQLite ODBC project.
  • Open the matching 32-bit or 64-bit ODBC Data Source Administrator.
  • Create a SQLite data source and enter the database file’s absolute path.
  • Choose that DSN in your ODBC client and test its connection.

What is a SQLite ODBC driver?

An ODBC driver lets software that uses the Open Database Connectivity interface talk to a database engine. The SQLite ODBC driver handles those requests for SQLite, which stores a database in a file rather than a separate database server.

The driver loads inside the application process, so its architecture must match the client. A DSN stores connection settings the client can select. The upstream project provides Windows installers and source code, and describes ODBC managers on Unix-like systems.

How to install and connect the SQLite ODBC driver

On Windows, start by installing the upstream package and registering a DSN. Then select it in the application. Keep the database file path handy before opening the configuration tool.

Step 1: Download the upstream Windows installer

The project README says the installer unpacks the driver and creates a System DSN. Choose the package that matches the ODBC application that will load it.

The project notes that 32-bit programs on 64-bit Windows need the 32-bit driver. A 32-bit client cannot load a 64-bit driver. Install both architectures only when you use applications of both types.

Step 2: Open the matching ODBC administrator

Search Windows for “ODBC Data Sources” and open the administrator with the same bitness as your application. Microsoft describes this Windows tool as the place to create and manage ODBC data sources.

Windows has separate administrators for 32-bit and 64-bit data sources. A DSN created in one may not appear to a client using the other, so check the application’s architecture rather than the Windows edition alone.

Step 3: Add a DSN for the SQLite file

In the ODBC administrator, choose the SQLite driver and add a data source. Give it a recognizable name, then enter the full path to the database file. The upstream README calls for an absolute pathname, including the drive letter on Windows.

If you need a database to test, start with the SQLDocs SQLite sample database. The driver documentation describes a default busy timeout of 100000 milliseconds when its field is left empty.

Step 4: Select the DSN in your ODBC client

Open the client’s ODBC connection settings and choose the DSN you created. Excel’s ODBC connection flow asks you to select a data source before it reads available tables. Power BI modeling and query setup depend on the client and are outside this installation guide.

For an existing SQLite database, the selected path should point to that file. If you are creating a test database first, see how SQLite creates a database file.

SQLite ODBC driver errors and fixes

Architecture and file path account for the setup failures covered by the documentation and forum reports.

SymptomCheckFix
Driver missingClient and driver architectureInstall matching 32-bit or 64-bit driver
Installer cannot write DLLInstall-folder access or DLL in useClose clients using the DLL, then run the installer again with write access.
Database will not openDSN file path and read accessSet the absolute path to the intended file

The driver does not appear in the application

The driver and client need matching architectures. The SQLite forum explains that a 32-bit SQLite DLL cannot connect to a 64-bit ODBC driver, and a client loads a driver of its own architecture.

SymptomDriver missing from the client
FixInstall a driver matching the client architecture and use the matching ODBC administrator.

The installer cannot write its driver file

The installer report showed “Error Opening File for writing” for the driver DLL. The forum discussion points to insufficient permission to write in Program Files or an existing process holding the file open. Close clients that may have loaded it, then run the installer again with permission to write to its install folder.

SymptomInstaller reports “Error Opening File for writing”
FixClose clients using the DLL, then rerun the installer with write access.

The connection cannot open the database

Check that the DSN contains the full path to the intended file and that the account running the client can read it. SQLite may create an empty database when a connection uses a wrong path, so verify the file and its tables before assuming it reached the intended data. See SQLite’s unable-to-open-database-file causes.

SymptomConnection cannot open the database
FixSet the DSN to the absolute path and confirm read access to the file.

Conclusion: verify the DSN before using it

A working SQLite ODBC connection depends on a matching driver architecture and a DSN that points to the right database file. Confirm both in the ODBC administrator, then test the DSN from the application that will use it.

For another file-level task, read the SQLDocs guide to backing up an SQLite database.

FAQ

These answers cover the driver’s setup and compatibility.

Which SQLite ODBC driver should I install?

Start with the open-source SQLite ODBC project and choose the installer that matches the architecture of the ODBC application. Check the project’s current package notes before installing.

Can 32-bit software use a 64-bit SQLite ODBC driver?

No. Install a driver that matches the client process. On 64-bit Windows, the project notes that both driver architectures can be installed when both kinds of applications need access.

What should I enter for the SQLite ODBC database path?

Use the absolute path to the SQLite database file, including its drive letter on Windows. Confirm that the client account can read the file.