Database Tour Documentation Contents Index

Opening SQLite Databases

 

There are several ways to open SQLite databases in Database Tour:

1. Opening through FD interface. Select FD interface, click SQLite, then fill all needed database parameters. You can also create a new SQLite database here.

Database connection parameters:

(required parameters are highlighted)

ParameterDescriptionValue example
Vendor libraryA path to installed SQLite library (when the application cannot find it automatically)C:\sqlite\sqlite3.dll
DatabaseA path to a database. A path can include path variables.
Instead of real database, you can specify ':memory:' to work with an empty in-memory database.
c:\databases\products.db
Shared cacheEnables or disables SQLite shared cache.True
Blocking mode

Sets the database connection locking mode. Possible values:

  • Exclusive (default) - gives maximum performance;
  • Normal - allows multi-user access.
Exclusive
Open mode

Sets the database open mode. Possible values:

  • ReadWrite
  • ReadOnly
ReadWrite
String format

Defines text data representation. Possible values:

  • Choose (default) - text data are represented according to their declared column types;
  • Unicode - text data are represented in Unicode encoding;
  • ANSI - text data are represented in ANSI encoding.
Unicode
GUID format

Defines the way of storing GUID values. Possible values:

  • String (default) - stores GUID as a character text value;
  • Binary - stores GUID as a binary text value.
String
Date and time format

Defines the way of storing date and time values. Possible values:

  • String (default) - stores date and time as a character string value in YYYY-MM-DD and HH:MM:SS.XXX format;
  • Binary - stores date and time as a real number, which is a Julian date;
  • DateTime - stores date and time as a real number, which is a Gregorian data and time.
String
Synchronization mode

Sets the database connection synchronization mode of the in-memory cache with the database. Possible values:

  • Full - synchronizes at every critical moment;
  • Normal - similar to above, but less often;
  • Off (default) - gives maximum performance.
Off
Foreign keys

Enables foreign key usage (if SQLite version is 3.6.19 or above). Possible values:

  • On (default) - foreign keys are enabled;
  • Off - foreign keys are disabled.
On
ExtensionsEnables or disables loading SQLite extensions.False
SQLite advancedAdditional SQLite database connection options. See SQLite documentation for supported Pragma statements.
PasswordSpecifies password for encrypted SQLite database.
SQL command separatorSpecifies a separator for SQL commands in multi-command SQL scripts.;

2. Opening through connection string. Select ADO interface, then choose Connection string option and write a connection string. This way is very flexible and allows to specify many additional parameters in the connection string and override standard Database Tour connection behavior. It is recommended for advanced users. Here are basic connection strings (more examples and details can be found in the Internet):

Driver=SQLite3 ODBC Driver;Database=C:\MyData\My_db.db;   (SQLite3 ODBC Driver must be installed)

3. Opening through ODBC DSN. Create (if it does not exist yet) an ODBC DSN of the corresponding type using Windows administrative tools, and point it to the database. Then:

- Select FD interface, click ODBC, then point the Data source parameter to the ODBC DSN by selecting it from the drop-down list.

or

- Select ADO or BDE interface, then choose ODBC data source option and then select the needed ODBC DSN from the drop-down list.

Notes

  1. When choosing the ODBC option, please make sure the corresponding ODBC driver installed and the bit-version of it matches the bit-version of the application (32 or 64).
  2. If you are asked for database password, this means the application could not connect the database without password. So, you should either enter it or, if you are sure the database is not password protected, just click OK without entering user name and password to see the error message.

See also

 Examples of ADO Connection Strings