Sunday, April 29, 2018

Creating an ODBC DSN for connecting to SQLite database

We know now how  to download an ODBC driver for SQLite Databases.

The SQLite ODBC for Win64 installation from the above link installs the ODBC driver and is immediately available in the Windows ODBC Data Source Administrator(x64) as seen earlier and shown here in the Drivers' tab.

SQLiteDSN_0

You can invoke the above window by clicking it in the search charm as shown.


SQLiteDSN_1

Let us now create a DSN for the SQLite database we created earlier. We will be using the database created in an earlier post  albeit it has just one row of data.

In the ODBC Data Source Administrator (64-bit) click Add... with the User DSN highlighted.

The Create New Data Source window opens as shown.


SQLiteDSN_2


Highlight SQlite3 ODBC Driver and click Finish.

The SQLite3 ODBC Configuration window opens as shown.


SQLiteDSN_3.png

We will create a DSN for the database aloha.sqlite persisted at this location.
C:\Users\Owner\Desktop\Blog2017\MSSS2017\SQLite3_DBS\aloha.sqlite

For Data Source Name enter: flowerDSN  (you can use any other)

For Database Name we will use the Browse...button and browse to this file.

C:\Users\Owner\Desktop\Blog2017\MSSS2017\SQLite3_DBS\aloha.sqlite

After entering these as shown click OK.


SQLiteDSN_4.png

With no more windows to open the DSN (flowerDSN) gets created as shown.


SQLite_5

I also have another User DSN called ODBCSQLite.

If I highlight and click Configure..., the Configuration window  opens as shown.


SQLite_6

The ODBC Data Source Administrator does not have a testing link for this, but the above DSN's have been verified to work.

No comments:

Post a Comment

What is SQLOISIM? What is it used for in SQL Server?

SQLIOSIM is a tool for simulating SQL Server IO. SQLIOSIM performs reliability and integrity tests on the disk systems that SQL Server uti...