skip to main content
Setting Up the oaodbc Sample : Setting Up a Sample on Linux/UNIX
 

Setting Up a Sample on Linux/UNIX

The following steps provide the process of setting up the schema, building the IP, and configuring the OpenAccessSDK810_C_SQL service. The following steps assume that you are using the OpenAccess SDK Management Console on Windows to manage the OpenAccess SDK installation on a Linux or UNIX machine.
Note: The make files shipped with the oaodbc sample assume that you are using the DataDirect ODBC driver manager. In this case, the current version of oaodbc sample works only on AIX because it assumes the UTF-16 encoding and wchar_t are the same.
1 To build the IP on UNIX you need to set up environment for the SDK and for an ODBC driver manager.
l. Change to the directory where the DataDirect Driver Manager is installed:
If you are using a C shell, type:
source odbc.csh (source odbc64.csh for the 64-bit client)
If you are using a Bourne or Korn shell, type:
source odbc.sh (source odbc64.sh for the 64-bit client)
a Change to the directory where the OpenAccess SDK is installed:
cd install_dir
b Set up the required environment variables.
If you are using a C shell, type:
source ip/cfg/setenv.csh
If you are using a Bourne or Korn shell, type:
. ./ip/cfg/setenv.sh
c Execute the build procedure
cd ip/oasqlip/oaodbc
make
The preceding steps place the IP module oasqlipodbc.so (sl) in the install_dir/ip/bin subdirectory.
2 Modify the odbc.ini file for the driver manager to create a system DSN for your ODBC-compliant data source. For example, you can configure a DSN using the DataDirect Connect for ODBC driver.
3 Run the OpenAccess SDK Management Console and modify the OpenAccessSDK810_C_SQL service to specify the IP module and logon option.
*Start the OpenAccess SDK Management Console.
b Double-click the OpenAccessSDK810_C_SQL node to expand it.
c Double-click the Service Settings node.
d Double-click the IP Parameters node.
e Set the value of ServiceIPModule to oasqlipodbc.dll.
f Double-click the Data Source Settings node.
g Double-click the Default node.
h Select the IP Parameters folder.
i Modify DataSourceIPProperties to the name of the ODBC DSN you created in Step 2. The oaodbc IP will use this DSN for accessing the SQL data source.
j Double-click the User Security node. Set DataSourceLogonMethod to DBMSLogon(UID,PWD).
k Save the settings and restart the OpenAccessSDK810_C_SQL service.
4 From an OpenAccess SDK client, use the data source Default of the OpenAccessSDK810_C_SQL service to connect to the oaodbc IP module you have just built and configured. Connections to this data source result in a connection to the ODBC DSN configured in the DataSourceIPProperties attribute.