2. What is ODBC?

The online technical resource Whatis.com provides the following definition for ODBC:

“Open Database Connectivity (ODBC) is an open standard application programming interface (API) for accessing a database. By using ODBC statements in a program, you can access files in a number of different databases, including Access, dBase, DB2, Excel, and Text. In addition to the ODBC software, a separate module or driver is needed for each database to be accessed. The main proponent and supplier of ODBC programming support is Microsoft.

“ODBC is based on and closely aligned with The Open Group standard Structured Query Language (SQL) Call-Level Interface. It allows programs to use SQL requests that will access databases without having to know the proprietary interfaces to the databases. ODBC handles the SQL request and converts it into a request the individual database system understands.”

2.1. Locating the ODBC Driver For PostgreSQL

The ODBC driver for PostgreSQL can be downloaded from the PostgreSQL web site. If you are running Windows, the driver also comes with an installer.

2.2. Configuring an ODBC Connection to xTuple

After installing the PostgreSQL ODBC driver, it is time to configure it. This is a simple task. If you are running Windows, you perform the configuration by opening your Windows Control Panel, selecting Administrative Tools, and then Data Sources (ODBC), as shown in the following screen:

Configuring ODBC Connection

On the ODBC Data Source Administrator Panel, click the ADD button to begin configuring a connection to your xTuple PostgreSQL database. The following screen will appear:

Selecting PostgreSQL Driver

Select the PostgreSQL driver from the list of available drivers and click the FINISH button. You will be presented with the following screen:

Final Driver Set Up

When finalizing the set up of the PostgreSQL driver, you are presented with the following options:

Data Source

Give your connection a name (leave out spaces).

Description

Describe your connection.

Database

Enter the name of the PostgreSQL database.

Server

Provide the name or IP address of the PostgreSQL server.

Port

Enter the port on which the PostgreSQL database is listening.

User Name

Provide a database user’s user name.

Password

Provide the database user’s password.

Now that our ODBC configuration is complete, we will use the connection to access data in an xTuple Database.