Unanswered: Problem in executing DB2 CLI calls through C++ on AIX 4.3.3
Following is the program that connects to db2 database to fetch the records from a table. The program is compiled and linked without any errors on AIX 4.3.3 and with C++ compiler. But during execution it fails at SQLAllocHandle() while allocating environment handle.
The same program when compiled and linked on Windows in VC++ and executed, it works fine. The DB2 database is created on Windows environment.
No changes to database configuration is done.
Kindly give the inputs on db2 database configuration setting on AIX machine to use db2 CLI calls.
Sample program is as below
#define MAX_UID_LENGTH 18
#define MAX_PWD_LENGTH 30
#define MAX_CONNECTIONS 2
SQLCHAR * sqlstmt =
(unsigned char *)"SELECT distinct BGN_MP,END_MP,WORK_ORDER_ID from tactual_location where work_order_id in ('B230
06012380127701','B23006050061101402') " ;
SQLINTEGER ind ;
SQLDOUBLE MP ;
struct test sBMP;
int error = allocEnv(&henv);
cout<<"Error in allocEnv"<<error<<endl;
// allocate a database handle for connection
error = allocConnect(henv,&hdbc);
// this will connect to eipms DNS configured on the machine.
error = allocConnect(henv,&hdbc1);