skip to main content
Setting Up the oaodbc Sample
 

Setting Up the oaodbc Sample

This appendix describes how to use the OAODBC example included as part of the OpenAccess SDK installation. The instructions here are for sample C/C++ IPs for use with the OpenAccess SDK SQL engine with a third-party SQL engine. Additional samples are available at:
https://www.progress.com
The oaodbc sample is provided to interface with your third-party SQL engine. It is a good starting point for writing your own IP.
This sample is a C IP for integrating a third-party SQL engine that has a ODBC API. The sample is configured as the Default data source under the OpenAccessSDK810_C_SQL service and can be used to access ODBC compliant data sources such as SQL Server, Oracle, and so on. The source code and project files for the sample are located under install_dir\ip\oasqlip\oaodbc directory.
The IP code is contained in the odbcdrv.c and odbcschema.c files. The file odbcdrv.c contains the functions that implement the Third-party SQL Engine IP API to handle connection, query execution, and metadata. The file odbcschema.c contains supporting routines that allow metadata functions to be mapped to queries on schema tables such as OA_TABLES that were supported in OpenAccess SDK 5.6 and earlier.
The installation configures a data source Default to access this sample. All that is required to use it is to compile oaodbc and to configure the DataSourceIPProperties with the ODBC DSN you want to use to connect to your SQL data source.
Highlights of oaodbc are:
Written in C
Fully functional interface to an ODBC-compliant SQL engine
Contains code that can be used to map metadata requests to queries