[unixODBC-support] DB2, Driver's SQLAllocHandle on SQL_HANDLE_HENV
chunmei.wu at oracle.com
Thu May 6 02:59:52 BST 2010
I’m using the latest unixODBC 2.3.0 in AIX and DB2, and faced this error
[IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
I found similar problem in http://mailman.unixodbc.org/pipermail/unixodbc-support/2006-July/000982.html. Following reply is from Nick:
It will be because there is a bug in a version of the 64 bit DB2 driver that assumes that a handle is a 32 object, and its not in this case. I think IBM have done a fix. The 2.2.12pre release on the ftp site has a way of working around this. from the Change file
* Allow decoupling of SQLHANDLES between application and driver, there is a 64bit DB2 where the driver handles are int's but unixODBC uses void *.
There is a define for DRV_SQLHANDLE in DriverManager/drivermanager.h that allows this choice at build time
The change file said “There is a define for DRV_SQLHANDLE in DriverManager/drivermanager.h that allows this choice at build time”, is there any configuration option related with this choice?
I found the $ODBCHOME/include/ sqltypes.h is “typedef void * SQLHANDLE;”, should this be “typedef int * SQLHANDLE”?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the unixODBC-support