README for the HP Neoview UNIX Drivers (Upd6 R2.2)
• The three environment variables that control tracing are:
— HPODBC_TRACE_LEVEL — sets trace level (ERROR, WARNING, CONFIG, INFO,
or DEBUG)
— HPODBC_TRACEFILE_NAME — specifies the name of the log file
— HPODBC_TRACEFILE_SIZE — specifies the maximum files size of the log files
• For information on the necessary data source configuration options, you will need to add
to the respective configuration files (for example, to odbc.ini). For more information, see the
Neoview ODBC Drivers Manual at docs.hp.com: http://docs.hp.com/en/busintellsol.html.
Running the Sample Program
Note: the examples after each step assume that you have default installation directories.
If you have a previous version of the hpodbc driver installed, you need to relink your existing
application to ensure that you pick up the correct version of the driver. If you are unsure of the
version, check the version of your application with this command:
ldd <object file>
1. Move to the directory where you installed the sample program:
cd /etc/hpodbc/sample
2. Compile the sample program.
Note: All drivers, other than the 64–bit driver for HP-UX (IA-64) and the x86_64 Linux driver,
are 32-bit drivers; therefore, applications need to be compiled accordingly.
• On Linux:
gcc connect_test.cpp -L/usr/lib -I/usr/include/hpodbc -lhpodbc \
-o connect_test
Note: The Linux driver is a 32-bit driver. If you are using an x86–64 machine, you need
to explicitly compile your application as a 32-bit application. For example:
gcc connect_test.cpp -m32 -L/usr/lib \
-I/usr/include/hpodbc -lhpodbc -o connect_test
• On x86_64 Linux:
gcc connect_test.cpp -L/usr/lib -I/usr/include/hpodbc \
-lhpodbc64 -o connect_test
• On HP-UX (IA-64):
aCC -AA connect_test.cpp -L/usr/lib -I/usr/include/hpodbc \
-lhpodbc -o connect_test -lm
To use cc for compiling and linking:
— Rename connect_test.cpp to connect_test.c.
— Run this command:
cc connect_test.c –I/usr/include/hpodbc –L/usr/lib \
–lstd_v2 -lCsup -lunwind -lm -lhpodbc -o connect_test
Note: Multi-threaded applications should use the “-mt” compiler option. Non
multi-threaded applications that use ODBC asynchronous execution should ensure that
the pthread library is linked in and it is linked in ahead of the libc library.
• On HP-UX (IA-64) 64 bit:
aCC +DD64 -AA connect_test.cpp -L/usr/lib/hpux64 -I/usr/include/hpodbc \
-lhpodbc64 -o connect_test -lm
32