IBM.Data.DB2.DB2Exception: Unable to allocate statement handle by Bartolomeo Nicolotti :: Rate this Message:
Reply | Reply to Author | View Threaded | Show Only this Message Hello, I've installed mono, and xsp (not yet mod_mono) on ubuntu following the instruction here: http://ubuntuforums.org/showthread.php?t=803743 in view of using mod_mono together with php on ubuntu server 8.04, to migrate a web service that access a db2/as400 database. I've also installed db2exc from ubuntu repository as said here: http://www.ubuntu.com/partners/ibm/db2 I can compile a test program that does a query to the db: http://www.nabble.com/file/p21953488/helloDB2.cs helloDB2.cs s...@lxpc54:~/src/test$ gmcs -r:/usr/lib/mono/1.0/IBM.Data.DB2.dll -r:/usr/lib/mono/2.0/System.Data.dll helloDB2.cs but when I execute it: s...@lxpc54:~/src/test$ sudo MONO_LOG_LEVEL=debug mono helloDB2.exe bart .... Mono-INFO: Assembly Ref addref System.Data 0x8362e10 -> System.Xml 0x83719d8: 2 Hello, bart Mono-INFO: DllImport attempting to load: 'libdb2'. Mono-INFO: DllImport loading location: 'libdb2.so'. Mono-INFO: Searching for 'SQLAllocHandle'. Mono-INFO: Probing 'SQLAllocHandle'. Mono-INFO: Found as 'SQLAllocHandle'. Mono-INFO: DllImport attempting to load: 'libdb2'. Mono-INFO: DllImport loading location: 'libdb2.so'. Mono-INFO: Searching for 'SQLAllocHandle'. Mono-INFO: Probing 'SQLAllocHandle'. Mono-INFO: Found as 'SQLAllocHandle'. Bart not useLibCli Bart not useLibCli Mono-INFO: DllImport attempting to load: 'libdb2'. Mono-INFO: DllImport loading location: 'libdb2.so'. Mono-INFO: Searching for 'SQLDriverConnectW'. Mono-INFO: Probing 'SQLDriverConnectWW'. Mono-INFO: Probing 'SQLDriverConnectWW'. Mono-INFO: Probing 'SQLDriverConnectW'. Mono-INFO: Found as 'SQLDriverConnectW'. Mono-INFO: DllImport attempting to load: 'libdb2'. Mono-INFO: DllImport loading location: 'libdb2.so'. Mono-INFO: Searching for 'SQLDriverConnectW'. Mono-INFO: Probing 'SQLDriverConnectWW'. Mono-INFO: Probing 'SQLDriverConnectWW'. Mono-INFO: Probing 'SQLDriverConnectW'. Mono-INFO: Found as 'SQLDriverConnectW'. Mono-INFO: DllImport attempting to load: 'libdb2'. Mono-INFO: DllImport loading location: 'libdb2.so'. Mono-INFO: Searching for 'SQLGetInfoW'. Mono-INFO: Probing 'SQLGetInfoWW'. Mono-INFO: Probing 'SQLGetInfoWW'. Mono-INFO: Probing 'SQLGetInfoW'. Mono-INFO: Found as 'SQLGetInfoW'. Mono-INFO: DllImport attempting to load: 'libdb2'. Mono-INFO: DllImport loading location: 'libdb2.so'. Mono-INFO: Searching for 'SQLGetInfoW'. Mono-INFO: Probing 'SQLGetInfoWW'. Mono-INFO: Probing 'SQLGetInfoWW'. Mono-INFO: Probing 'SQLGetInfoW'. Mono-INFO: Found as 'SQLGetInfoW'. Mono-INFO: DllImport attempting to load: 'libdb2'. Mono-INFO: DllImport loading location: 'libdb2.so'. Mono-INFO: Searching for 'SQLGetDiagRec'. Mono-INFO: Probing 'SQLGetDiagRec'. Mono-INFO: Found as 'SQLGetDiagRec'. Mono-INFO: DllImport attempting to load: 'libdb2'. Mono-INFO: DllImport loading location: 'libdb2.so'. Mono-INFO: Searching for 'SQLGetDiagRec'. Mono-INFO: Probing 'SQLGetDiagRec'. Mono-INFO: Found as 'SQLGetDiagRec'. Bart not useLibCli Unhandled Exception: IBM.Data.DB2.DB2Exception: ERROR [08003] [IBM][CLI Driver] CLI0106E Connection is closed. SQLSTATE=08003 InternalExecuteNonQuery: Unable to allocate statement handle. at IBM.Data.DB2.DB2Command.AllocateStatement (System.String location) [0x00000] at IBM.Data.DB2.DB2Command.ExecuteNonQueryInternal (CommandBehavior behavior) [0x00000] at IBM.Data.DB2.DB2Command.ExecuteReader (CommandBehavior behavior) [0x00000] at IBM.Data.DB2.DB2Command.ExecuteReader () [0x00000] at (wrapper remoting-invoke-with-check) IBM.Data.DB2.DB2Command:ExecuteReader () at HelloWorldDb2.Main (System.String[] args) [0x00000] -- View this message in context: http://www.nabble.com/IBM.Data.DB2.DB2Exception%3A-Unable-to-allocate-statement-handle-tp21953488p21953488.html Sent from the Mono - Dev mailing list archive at Nabble.com. _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list