Top

5.3.8.Testing the ODBC Data Source

Once an ODBC Data Source has been configured, you can test it by highlighting the desired DSN and clicking the Test button, on the User DSN or System DSN tabs of the OpenLink ODBC Administrator. This will present you with the following multi-tab dialog box, with the opportunity to override any of the DSN parameters on the fly.

Figure5.169.OpenLink ODBC Administrator

OpenLink ODBC Administrator

Figure5.170.SQL Server Single-Tier DSN Connection Test, Identity tab

SQL Server Single-Tier DSN Connection Test, Identity tab

Figure5.171.SQL Server Single-Tier DSN Connection Test, Connection tab

SQL Server Single-Tier DSN Connection Test, Connection tab

Figure5.172.SQL Server Single-Tier DSN Connection Test, Preferences tab

SQL Server Single-Tier DSN Connection Test, Preferences tab

Figure5.173.SQL Server Single-Tier DSN Connection Test, About tab

SQL Server Single-Tier DSN Connection Test, About tab

When all parameters are as desired, click Connect, and a successful test will bring the following message:

Figure5.174.DSN Connection Test Results

DSN Connection Test Results

Unsuccessful test connections may present any of a number of error messages. To resolve those errors, please refer to the troubleshooting section of this manual.

For more thorough testing, you can use odbctest, a sample application installed along with the OpenLink Lite Driver. odbctest is a simple command-line, ODBC compliant, Interactive SQL client.

It may be accessed through the Terminal application, by issuing the command

/Library/iodbc/bin/odbctest

At the SQL command prompt enter "?" for a list of ODBC DSNs on your machine, or enter a valid ODBC Connect String (e.g., with the DSN created above, named "DEMO", you would enter:

DSN=DEMO;UID=<Username>;PWD=<Password>

).

From here, any valid SQL Statement may be executed. Generally, you will need to know a valid table name within the database to be able to retrieve information from it. Within odbctest, the command 'tables' will return a list of all tables accessible through your active connection.

If the query executes successfully you will see a table of the data returned by the query; if unsuccessful, you will see the entire error message returned from the backend DBMS.