The following table describes the key connection string parameters for connecting to SQLite via the ODBC driver.
| Parameter | Description |
|---|---|
ClientLibrary |
The path to the SQLite3 client library. |
Database |
The path to the SQLite database file. |
Direct |
Enables direct connections to a database, which doesn’t require the SQLite3 client library. |
EncryptionKey |
The encryption key for connecting to an encrypted database. |
EncryptAlgorithm |
The encryption algorithm for connecting to an encrypted database. Available values:
|
| Parameter | Description |
|---|---|
Allow Null Strings |
Allows NULL values to be passed to metadata retrieval functions, ensuring compatibility with third-party tools that send NULL where the ODBC specification requires a value. |
Busy Timeout |
Sets the busy timeout duration in milliseconds or disables busy handlers. A busy handler will sleep for the specified amount of time when a table is locked. After this time has elapsed, an exception is raised. Setting the timeout to 0 disables all busy handlers. The default value is 15. |
ConnectMode |
Specifies the connection mode. Available values:
|
Empty Strings as NULL |
Treats empty strings as NULL values when passed to metadata retrieval functions, ensuring compatibility with third-party tools that pass empty strings instead of NULL. |
Enable Shared Cache |
Enables multiple connections to the same database to share a single data and schema cache. Shared-cache mode is intended for use in embedded servers. The default value is True. |
ForceCreateDatabase |
Creates a new database if it does not exist before opening a connection. |
Integer As BigInt |
If True, maps INTEGER fields to SQL_BIGINT. The default value is False. |
Journal Mode |
Specifies how SQLite manages transactions and the rollback journal. Available values:
|
Locking Mode |
Specifies how the driver locks the database file. Available values:
|
ODBC Behavior |
Specifies the ODBC specification version the driver must conform to, based on the expectations of a third-party tool. Typically, the driver’s behavior is controlled by setting the SQL_ATTR_ODBC_VERSION attribute via the SQLSetEnvAttr function. However, some third-party tools expect the driver to behave according to ODBC 2.x standards, but either fail to set this attribute or pass an incorrect value.In such cases, you can explicitly define the required behavior in the connection string using the ODBC Behavior parameter. Available values:
|
Real As Double |
Determines how REAL (floating-point) values are handled or stored—specifically, whether they should be treated as DOUBLE PRECISION instead of the standard REAL type. |
RegionalDateTimeSettings |
Enables the use of local regional settings when converting dates and times to strings. |
RegionalNumberSettings |
Enables local regional settings for converting numbers to strings. The default value is False. |
String Types |
Specifies the type of string data returned. Available values:
|
Synchronous |
Specifies how the driver syncs database writes to disk. Available values:
|
UnknownAsString |
If False, maps fields of unknown data types (for example, the result of the ifnull function) to SQL_LONGVARCHAR, because their maximum length is unknown. If True, maps fields of unknown data types to SQL_VARCHAR with a size of 8192 and truncates values that exceed this size. The default value is False. |
DRIVER={Devart ODBC Driver for SQLite};Database=myDatabase
DRIVER={Devart ODBC Driver for SQLite};Direct=False;Database=myDatabase;Client Library=myClientLibrary