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.
Figure5.79.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.
Figure5.80.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.
Figure5.81.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.
Figure5.82.CPP (C++) Demo
If the query executes successfully you will see a table of the data returned by the query.
Figure5.83.CPP (C++) Demo