[unixODBC-support] DB2, Driver's SQLAllocHandle on SQL_HANDLE_HENV

Martin Evans martin.evans at easysoft.com
Thu May 6 08:34:36 BST 2010


Chunmei Wu wrote:
> Hi everyone,
> 
> 
> 
> 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”?
> 
> 
> 
> Thanks,
> 
> Chunmei Wu
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> _______________________________________________ unixODBC-support
> mailing list unixODBC-support at mailman.unixodbc.org 
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support

Have you set and exported DB2INSTANCE?

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com


More information about the unixODBC-support mailing list