• Topic
  • Discussion
  • UdaWikiWeb.TestingWindowsODBCDSNs(Last) -- Owiki? , 2016-08-19 15:01:05 Edit owiki 2016-08-19 15:01:05

    Testing ODBC DSNs on Windows, with C++ Demo

    C++ Demo is a simple ODBC-based Interactive SQL processor written, as may be obvious from its name, in C++. The binary executable may be found at --

    <OPENLINK_INSTALLATION_DIRECTORY>\samples\odbc
    

    As with other sample applications we ship, when source code is available, it may be found alongside the executable.

    Be sure to launch the tool appropriate to the Driver and DSN you are testing --

    Driver/DSN Windows default location
    64-bit 64-bit C:\Program Files\OpenLink Software\UDA\Samples\Odbc\cppdemo.exe
    32-bit 64-bit C:\Program Files (x86)\OpenLink Software\UDA\Samples\Odbc\cppdemo.exe
    32-bit 32-bit C:\Program Files\OpenLink Software\UDA\Samples\Odbc\cppdemo.exe
    1. The tool will launch.





    2. Select menu item Environment >> Open Connection. The ODBC Driver Manager will present a list of available ODBC DSNs. Select the DSN to which you wish to connect ("Informix 7 on Local" has been selected, below) --





    3. You will be presented with a Login Dialog. Enter the user name and password for the target database, and click Connect --





    4. You should now be connected to the chosen data source. Use the SQL >> Execute SQL menu item to get the SQL input dialog. Enter any valid SQL statement (see example in screen shot), and click OK.





    5. You will be presented with the results of your query.





    6. Close the connection by selecting the Environment >> Close Connection menu item. Exiting the application through any normal Windows pattern will also close the connection.

    Referenced by...