www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

ODBC Drivers

Windows Data Source Configuration
Creating ODBC Data Sources DB2 Informix 7 and 9 Ingres and OpenIngres Oracle 8, 9, and 10 Progress 9.1 SQL-92 Other Progress Microsoft or Sybase SQL Server (TDS) ODBC-JDBC Lite Bridges for Java MySQL PostgreSQL Connect String parameters Testing the ODBC Data Source
Unix Data Source Configuration
Mac OS X Data Source Configuration
ODBC to Jet Data Type Mapping
New Features

5.1. Windows Data Source Configuration

5.1.1. Creating ODBC Data Sources

5.1.1.1. Windows ODBC Data Sources

The Microsoft ODBC 2.0, 3.0 & 3.5 Driver Manager (depicted below) allows the creation of User, System, and File DSNs.

A User DSN will only be available to the user who creates the data source; a System DSN will be available to the whole system so that any user, including the system account, will be able to use that data source; A File DSN is a special 'mobile' data source that stores the data source information associated with the ODBC Driver in a file that is sharable.

The steps for creating a DSN are as follows:-

From the desired tab (User; System; File) press the Add button to begin creating a new Data source.

Figure: 5.1.1.1.1. Microsoft ODBC Administrator
Microsoft ODBC Administrator

Pick the ODBC Driver to be used to create your ODBC DSN. In this example the Driver Labeled "OpenLink Lite for DB2 (32 Bit)" is highlighted.

Figure: 5.1.1.1.2. Microsoft ODBC Administrator
Microsoft ODBC Administrator

Once you have selected the appropriate OpenLink Lite Driver, you will be presented with the OpenLink ODBC Data Source Configuration Wizard for the driver selected. The Wizard has several frames, most of which require you to provide information.


5.1.1.2. Data Source Tab

The first tab is the Data Source Tab. The following parameters are common to all databases.

Figure: 5.1.1.2.1. Data Source tab (DB2 example)
Data Source tab (DB2 example)

5.1.1.3. Database-Specific Tab

In the second frame of the wizard, you enter a database alias for the underlying communications layer of the database, and a username and password. If you select the "Connect now to verify that all settings are correct" check-box, pressing the Next> button will verify that DSN can connect.

Figure: 5.1.1.3.1. Database-specific tab (DB2 example)
Database-specific tab (DB2 example)

5.1.1.4. OpenLink Parameters

The third frame contains OpenLink-specific parameters for the DSN connection; here you can set the connection to be read-only, have it defer the fetching of long (BLOB) data, disable interactive login, set a row-buffer size (the number of records to be transported over the network in a single network hop), set a file containing SQL statements to run on login, set the dynamic cursor sensitivity level, and enable logging to a file.

Figure: 5.1.1.4.1. OpenLink Parameters tab (DB2 example)
OpenLink Parameters tab (DB2 example)

5.1.1.5. ODBC Parameters

The fourth frame contains more custom parameters: you can enable changes for the MS Jet Engine, disable autocommitting, and disable the rowset size limit. You can also set the SQL_DBMS_NAME (required for some applications, notably Access).

Figure: 5.1.1.5.1. ODBC Parameters tab (DB2 example)
ODBC Parameters tab (DB2 example)

5.1.1.6. `About' frame

The fifth and final frame in the wizard shows the details of the connection - the driver name and version and DSN configuration parameters; it also gives you the option to test the data-source.

Figure: 5.1.1.6.1. `About' tab (DB2 example)
`About' tab (DB2 example)

5.1.1.7. Glossary of Standard Configuration Options



5.1.2. DB2

5.1.2.1. Datasource

Figure: 5.1.2.1.1. Datasource tab
Datasource tab

5.1.2.2. DB2 Options

Figure: 5.1.2.2.1. DB2 Options tab
DB2 Options tab

5.1.2.3. OpenLink Parameters

Figure: 5.1.2.3.1. OpenLink Parameters tab
OpenLink Parameters tab

5.1.2.4. ODBC Parameters

Figure: 5.1.2.4.1. ODBC Parameters tab
ODBC Parameters tab

5.1.2.5. Confirm and Test

Figure: 5.1.2.5.1. Confirm and Test tab
Confirm and Test tab


5.1.3. Informix 7 and 9

5.1.3.1. Datasource

Figure: 5.1.3.1.1. Datasource tab
Datasource tab

5.1.3.2. Informix 9 - Connect

Figure: 5.1.3.2.1. Informix 9 - Connect tab
Informix 9 - Connect tab

Enter details of the Informix server.


5.1.3.3. Informix 9 Options

Figure: 5.1.3.3.1. Informix 9 Options tab
Informix 9 Options tab

Enter options for the Informix connection:


5.1.3.4. OpenLink Parameters

Figure: 5.1.3.4.1. OpenLink Parameters tab
OpenLink Parameters tab

5.1.3.5. ODBC Parameters

Figure: 5.1.3.5.1. ODBC Parameters tab
ODBC Parameters tab

5.1.3.6. Finish and Test

Figure: 5.1.3.6.1. Finish and test tab
Finish and test tab


5.1.4. Ingres and OpenIngres

5.1.4.1. Datasource

Figure: 5.1.4.1.1. Datasource tab
Datasource tab

5.1.4.2. Ingres Net

Figure: 5.1.4.2.1. Ingres - Net tab
Ingres - Net tab

Enter details here about the Ingres server.


5.1.4.3. OpenLink Parameters

Figure: 5.1.4.3.1. OpenLink Parameters tab
OpenLink Parameters tab

5.1.4.4. ODBC Parameters

Figure: 5.1.4.4.1. ODBC Parameters tab
ODBC Parameters tab

5.1.4.5. Finish & test

Figure: 5.1.4.5.1. Finish and tab
Finish and tab


5.1.5. Oracle 8, 9, and 10

5.1.5.1. Datasource

Figure: 5.1.5.1.1. Datasource tab
Datasource tab

5.1.5.2. SQL*NET tab

Figure: 5.1.5.2.1. SQL*NET tab
SQL*NET tab

Enter details here for the SQL*NET.


5.1.5.3. Oracle tab

Figure: 5.1.5.3.1. Oracle tab
Oracle tab

contains the options:


5.1.5.4. Transparent Application Failover (TAF) tab

Figure: 5.1.5.4.1. Oracle tab
Oracle tab

When OpenLink's TAF support is enabled, in the event that a failover attempt fails, the Lite driver or Multi-Tier agent will instruct Oracle to retry. By default, the maximum number of failover attempts is 10 and the interval between retry attempts is 10 seconds. The default values can be overridden.

See the Oracle RAC/TAF documentation for more.


5.1.5.5. OpenLink Parameters

Figure: 5.1.5.5.1. OpenLink Parameters tab
OpenLink Parameters tab

5.1.5.6. ODBC Parameters

Figure: 5.1.5.6.1. ODBC Parameters tab
ODBC Parameters tab

5.1.5.7. Finish and testing

Figure: 5.1.5.7.1. Finish and Test tab
Finish and Test tab

5.1.5.8. Finishing and Testing

Figure: 5.1.5.8.1. Finishing and testing tab
Finishing and testing tab


5.1.6. Progress 9.1 SQL-92

5.1.6.1. Datasource

Figure: 5.1.6.1.1. Datasource tab
Datasource tab

5.1.6.2. Progress 9 tab

Figure: 5.1.6.2.1. Progress 9 tab
Progress 9 tab

Enter details here to specify Progress connection information.


5.1.6.3. OpenLink Parameters

Figure: 5.1.6.3.1. OpenLink Parameters tab
OpenLink Parameters tab

5.1.6.4. ODBC Parameters

Figure: 5.1.6.4.1. ODBC Parameters tab
ODBC Parameters tab

5.1.6.5. Finishing & Testing

Figure: 5.1.6.5.1. Finishing and testing tab
Finishing and testing tab


5.1.7. Other Progress

5.1.7.1. Datasource

Figure: 5.1.7.1.1. Datasource tab
Datasource tab

5.1.7.2. Progress tab

Figure: 5.1.7.2.1. Progress tab
Progress tab

Enter details here to specify Progress connection information.


5.1.7.3. Additional Progress-specific parameters

Figure: 5.1.7.3.1. Additional Progress-specific parameters tab
Additional Progress-specific parameters tab

5.1.7.4. OpenLink Parameters

Figure: 5.1.7.4.1. OpenLink Parameters tab
OpenLink Parameters tab

5.1.7.5. ODBC Parameters

Figure: 5.1.7.5.1. ODBC Parameters tab
ODBC Parameters tab

5.1.7.6. Finish and test

Figure: 5.1.7.6.1. Finish and Test tab
Finish and Test tab

5.1.7.7. Connecting Progress Lite to Multiple Databases and Gaining Access to Arrays

Utility and functionality for the Progress Driver that enables the user to connect to multiple databases and use array fields. This is only applicable to drivers not built against Progress SQL92 Libraries.

After installing a Progress Lite Driver you should find the following files in the lite32 directory:

setup.p
setup.i
oplrvc1.p
oplrvc2.p

setup.p is a Progress script program. When the program runs it will ask you what databases you wish to connect to and generate a catalog file of all the databases and tables within into a tableview file (.dat), and will create its associated parameter file (.pf).

Doing this allows you to connect to multiple databases, allows you to see all the tables in all databases from SQLTables, and allows you to use arrays fields through ODBC.

Prior to running this program you must ensure that all database servers for the databases you wish to include are running since the program will need to connect to them.

Make sure that your $DLC environment variable is set correctly to point to your DLC directory.

e.g. DLC=/dbs/progress/dlc

export DLC

Go to the openlink/lite32 directory, and type the following:

$DLC/bin/pro -p setup.p

Note:

This may vary between versions. In Progress 6, pro is in the dlc directory not dlc/bin.

You may also need to set a PROPATH environment variable to include the current working directory and the directory containing the setup.p utility files.

You will get the following screens:

.       @@@@@@   @@@@@@   @@@@@@@   @@@@@   @@@@@@   @@@@@@@   @@@@@    @@@@@
       @     @  @     @  @     @  @     @  @     @  @        @     @  @     @
      @     @  @     @  @     @  @        @     @  @        @        @
     @@@@@@   @@@@@@   @     @  @  @@@@  @@@@@@   @@@@@     @@@@@    @@@@@
    @        @   @    @     @  @     @  @   @    @              @        @
   @        @    @   @     @  @     @  @    @   @        @     @  @     @
  @        @     @  @@@@@@@   @@@@@   @     @  @@@@@@@   @@@@@    @@@@@

                           Progress Software Corporation
                                    14 Oak Park
                            Bedford, Massachusetts 01730
                                    617-280-4000

       PROGRESS is a registered trademark of Progress Software Corporation
      Copyright 1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995
                        by Progress Software Corporation
                             All Rights Reserved

PROGRESS Version 7.3C as of Thu Jun 29 15:05:14 EDT 1995

Followed by:

+-----------------------------------------------------+
| Enter a number of databases you want to connect to. |
| The first database is your master database.         |
+-----------------------------------------------------+
+-----------------------------------------------------------------------------+
| # DbName                         Connect String                           OK|
|-- ------------------------------ ---------------------------------------- --|
| 1 ______________________________ ________________________________________ __|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
+-----------------------------------------------------------------------------+





Enter data or press PF4 to end.

At this point you will need to give the program information to contact the databases you want to include here. As shown below.

+-----------------------------------------------------+
| Enter a number of databases you want to connect to. |
| The first database is your master database.         |
+-----------------------------------------------------+
+-----------------------------------------------------------------------------+
| # DbName                         Connect String                           OK|
|-- ------------------------------ ---------------------------------------- --|
| 1 /users/progress/dbs/pro7test__ -N tcp -H 194.152.95.26 -S pro7test_____ __|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
+-----------------------------------------------------------------------------+





Enter data or press PF4 to end.

After entering the line of information press return. There will be a little pause while the program checks that the database server is running and can be contacted. When this is verified OK will appear at the end of the line.

+-----------------------------------------------------+
| Enter a number of databases you want to connect to. |
| The first database is your master database.         |
+-----------------------------------------------------+
+-----------------------------------------------------------------------------+
| # DbName                         Connect String                           OK|
|-- ------------------------------ ---------------------------------------- --|
| 1 /users/progress/dbs/pro7test__ -N tcp -H 194.152.95.26 -S pro7test_____ OK|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
+-----------------------------------------------------------------------------+





Enter data or press PF4 to end.

The cursor will move to the next line. Repeat the above procedure for each database. Press PF4 when finished. You will then need to supply the name for the .dat and .pf files to be created.

+-----------------------------------------------------+
| Enter a number of databases you want to connect to. |
| The first database is your master database.         |
+-----------------------------------------------------+
+-----------------------------------------------------------------------------+
| # DbName                         Connect String                           OK|
|-- ------------------------------ ---------------------------------------- --|
| 1 /users/progress/dbs/pro7test__ -N tcp -H 194.152.95.26 -S pro7test_____ OK|
| 2 ______________________________ ________________________________________ __|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
+-----------------------------------------------------------------------------+



Basename for .pf and .dat files_____________________ 

Enter data or press PF4 to end.

After a brief period the program will have finished:

+-----------------------------------------------------+
| Enter a number of databases you want to connect to. |
| The first database is your master database.         |
+-----------------------------------------------------+
+-----------------------------------------------------------------------------+
| # DbName                         Connect String                           OK|
|-- ------------------------------ ---------------------------------------- --|
| 1 /users/progress/dbs/pro7test__ -N tcp -H 194.152.95.26 -S pro7test_____ OK|
| 2 ______________________________ ________________________________________ __|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
+-----------------------------------------------------------------------------+



Creating .pf file to use
Creating .dat file with table information 

Procedure Complete. Press space bar to continue.

Now you have to integrate these files into your system.

In the Lite Driver setup dialog box you will find an option box called Table View. In this field place:

<full path and file name to .dat file>

Now you can use in the Connection Options, only:

-pf <full path and file name to .pf file>

To resolve you connection parameters since they are include in this file.



5.1.8. Microsoft or Sybase SQL Server (TDS)

5.1.8.1. Installation

The OpenLink ODBC Driver for SQL Server and Sybase for Windows is distributed in a single .msi file.

Click the Open link that appears in your Downloads dialog.

Figure: 5.1.8.1.1.

The installer will display a "Welcome" message. Click "Next."

Figure: 5.1.8.1.1.

The next screen will display the License Agreement for the OpenLink Lite Driver. Please read and check the "I accept the license agreement" checkbox. Then, click Next.

Figure: 5.1.8.1.1.

Your driver needs a license file to operate. Click the Browse button to locate a commercial or evaluation license that you have previously downloaded onto your local hard drive. Alternatively, click the Try & Buy button to obtain a commercial or evaluation license.

Figure: 5.1.8.1.1.

You can check the "I don't want to install a license file right now" check box. This option will permit you to install the product. However, you will not be able to use the product until you obtain a commercial or evaluation license key.

Figure: 5.1.8.1.1.

Click Next.

Choose among the Typical, Complete, or Custom installation types.

Figure: 5.1.8.1.1.

Click Next.

Click the Install button.

Figure: 5.1.8.1.1.

Installation is complete. Click the Finish button.

Figure: 5.1.8.1.1.

You may be prompted to restart your computer, if you have a pre-existing OpenLink License Manager running on your computer.


5.1.8.2. Configuration

Open the ODBC Data Sources Administrator that appears in the Administrative Tools section of your Control Panel.

Figure: 5.1.8.2.1.

Click the System DSN tab:

Figure: 5.1.8.2.1.

Click the Add button. Then, select the OpenLink SQL Server and Sybase Lite Driver from the list of available drivers:

Figure: 5.1.8.2.1.

Click Finish.

The first dialog prompts for a Data Source Name and optional description.

Figure: 5.1.8.2.1.

Click Next.

The second dialog prompts for information that identifies the SQL Server DBMS and database.

Figure: 5.1.8.2.1.

Use the "Advanced" button to manually configure a connection if the SQL Server instance could not be dynamically located, as detailed below.

Figure: 5.1.8.2.1.

Click Next to continue.

The third dialog takes a combination of database specific and optional parameters:

Figure: 5.1.8.2.1.

Click Next to continue.

The fourth dialog enables you to set optional, ODBC connection parameters:

Figure: 5.1.8.2.1.

Click Next to continue.

The fifth dialog enables you to set additional parameters to enhance compatibility with applications:

Figure: 5.1.8.2.1.

Click Next to continue.

The final dialog enables you to text your Data Source. Click the Test Data Source button.

Figure: 5.1.8.2.1.

A connection has been established:

Figure: 5.1.8.2.1.



5.1.9. ODBC-JDBC Lite Bridges for Java

5.1.9.1. Datasource

Figure: 5.1.9.1.1. Datasource tab
Datasource tab

5.1.9.2. JDBC tab

Figure: 5.1.9.2.1. JDBC tab
JDBC tab

Enter details here for the JDBC Driver to connect with:


5.1.9.3. JDBC Parameters

Figure: 5.1.9.3.1. JDBC Parameters tab
JDBC Parameters tab

5.1.9.4. OpenLink Parameters

Figure: 5.1.9.4.1. OpenLink Parameters tab
OpenLink Parameters tab

5.1.9.5. Additional Compatibility Parameters

Figure: 5.1.9.5.1. Additional Compatibility Parameters tab
Additional Compatibility Parameters tab

5.1.9.6. Finish & Test

Figure: 5.1.9.6.1. Finish and test tab
Finish and test tab


5.1.10. MySQL

5.1.10.1. Datasource

Figure: 5.1.10.1.1. Datasource tab
Datasource tab

5.1.10.2. MySQL Options

Figure: 5.1.10.2.1. MySQL Options tab
MySQL Options tab

5.1.10.3. MySQL Options

Figure: 5.1.10.3.1. MySQL Options tab
MySQL Options tab

5.1.10.4. OpenLink Parameters

Figure: 5.1.10.4.1. OpenLink Parameters tab
OpenLink Parameters tab

5.1.10.5. ODBC Parameters

Figure: 5.1.10.5.1. ODBC Parameters tab
ODBC Parameters tab

5.1.10.6. Finish and Test

Figure: 5.1.10.6.1. Finish and test tab
Finish and test tab


5.1.11. PostgreSQL

5.1.11.1. Datasource

Figure: 5.1.11.1.1. Datasource tab
Datasource tab

5.1.11.2. PostgreSQL Options

Figure: 5.1.11.2.1. PostgreSQL Options tab
PostgreSQL Options tab

5.1.11.3. OpenLink Parameters

Figure: 5.1.11.3.1. OpenLink Parameters tab
OpenLink Parameters tab

5.1.11.4. ODBC Parameters

Figure: 5.1.11.4.1. ODBC Parameters tab
ODBC Parameters tab

5.1.11.5. Finish & Test

Figure: 5.1.11.5.1. Finish & test tab
Finish & test tab


5.1.12. Connect String parameters

5.1.12.1. Common Connect string

You may sometimes be required to build a complete ODBC Connection String to access an ODBC Datasource.

A connection string has the following syntax:

          connection-string ::= empty-string[;] | attribute[;] | attribute; connection-string
          empty-string ::=
          attribute ::= attribute-keyword=attribute-value | DRIVER=[{]attribute-value[}]
          attribute-keyword ::= DSN | UID | PWD | driver-defined-attribute-keyword
          attribute-value ::= character-string
          driver-defined-attribute-keyword ::= identifier
        

where character-string has zero or more characters; identifier has one or more characters; attribute-keyword is not case-sensitive; attribute-value may be case-sensitive; and the value of the DSN keyword does not consist solely of blanks.

The following list describes valid attributes and their values common to all databases:


5.1.12.2. DB2 Connect string

There is nothing specific to DB2. See above section for common parameters.


5.1.12.3. Informix Connect string

The following list describes valid attributes and their values that are specific to Informix:


5.1.12.4. Ingres and OpenIngres Connect string

The following list describes valid attributes and their values that are specific to Ingres and OpenIngres:


5.1.12.5. Oracle Connect string

The following list describes valid attributes and their values that are specific to Oracle:


5.1.12.6. Progress Connect string

The following list describes valid attributes and their values that are specific to Progress:


5.1.12.7. Microsoft or Sybase SQLServer (TDS) Connect string

The following list describes valid attributes and their values that are specific to Microsoft SQLServer:



5.1.13. Testing the ODBC Data Source

Once you have configured an ODBC Data Source you can test it using the Test Connection button on the DataSources tab.

For a more thorough test, you can use the sample applications provided in the OpenLink Lite Driver installer (unless you chose not to install them). You will have short-cuts to the sample applications in the 'Start' Menu.

The sample application 'CPP Demo 32 Bit' is a good application to use to test an ODBC Data Source. It is simple, allows you to execute simple SQL Queries and includes source code.

When the application has been started, select 'Open Connection' from the Environment menu item.

Figure: 5.1.13.1. CPP (C++) Demo
CPP (C++) Demo

Select the data source you recently created and now want to test. Unless you configured the data source to hide the login dialog prompt you will be presented with it. You need to enter a valid username and password to authenticate the connection.

Figure: 5.1.13.2. CPP (C++) Demo
CPP (C++) Demo

Once the connection has been established you should observe that the title bar of the application now includes the name of the data source that you connected to.

Use the SQL/Execute SQL menu item to query the database and validate basic communication between the Driver and the Database.

Figure: 5.1.13.3. CPP (C++) Demo
CPP (C++) Demo

Enter a valid SQL Statement. You will need to know a valid table name within the database to be able to retrieve information from it. To simply return all available data in a particular table of your choice simply change the name 'authors' (show below) to the name of the table you wish to query. Press OK to execute the query.

Figure: 5.1.13.4. CPP (C++) Demo
CPP (C++) Demo

If the query executes successfully you will see a table of the data returned by the query.

Figure: 5.1.13.5. CPP (C++) Demo
CPP (C++) Demo