[Mono-devel-list] problem with DB2Command class

Pablo Cardona pcardona37 at gmail.com
Wed Jul 6 09:30:24 EDT 2005


I'm running the process with my user account, after executing
db2profile at /home/db2instl

I' ve tried to running as root after executing db2profile and a
different exception is thrown:

Unhandled Exception: IBM.Data.DB2.DB2Exception: ERROR [08003]
[IBM][CLI Driver] CLI0106E  Connection is closed. SQLSTATE=08003
InternalExecuteNonQuery: Unable to allocate statement handle.
in <0x000d3> IBM.Data.DB2.DB2Command:AllocateStatement (System.String location)
in (wrapper remoting-invoke-with-check)
IBM.Data.DB2.DB2Command:AllocateStatement (string)
in <0x001d8> IBM.Data.DB2.DB2Command:ExecuteNonQueryInternal
(CommandBehavior behavior)
in (wrapper remoting-invoke-with-check)
IBM.Data.DB2.DB2Command:ExecuteNonQueryInternal
(System.Data.CommandBehavior)
in <0x0003f> IBM.Data.DB2.DB2Command:ExecuteReader (CommandBehavior behavior)
in (wrapper remoting-invoke-with-check)
IBM.Data.DB2.DB2Command:ExecuteReader (System.Data.CommandBehavior)
in <0x0000f> IBM.Data.DB2.DB2Command:ExecuteReader ()
in (wrapper remoting-invoke-with-check) IBM.Data.DB2.DB2Command:ExecuteReader ()
in <0x0010f> MainClass:Main (System.String[] args)

It seems that in this new exception the conecction is closed, but
before executing ExecuteReader method I check if the connection State
is Open.

On 7/6/05, Victor Vatamanescu <victor.vatamanescu at hqsoftconsult.com> wrote:
> Hello!
> 
> What is the user account under your process is running?
> 
> Regards,
> 
> Victor
> 
> ----- Original Message -----
> From: "Pablo Cardona" <pcardona37 at gmail.com>
> To: <mono-devel-list at lists.ximian.com>
> Sent: Wednesday, July 06, 2005 12:07 PM
> Subject: [Mono-devel-list] problem with DB2Command class
> 
> 
> Hi, I'm trying to make queries with a DB2 database, and when I try to
> execute a query with DB2Command class I always have the same
> exception:
> 
> Unhandled Exception: IBM.Data.DB2.DB2Exception: ERROR [08003]
> InternalExecuteNonQuery: Unable to allocate statement handle.
> in <0x000d3> IBM.Data.DB2.DB2Command:AllocateStatement (System.String
> location)
> in (wrapper remoting-invoke-with-check)
> IBM.Data.DB2.DB2Command:AllocateStatement (string)
> in <0x001d8> IBM.Data.DB2.DB2Command:ExecuteNonQueryInternal
> (CommandBehavior behavior)
> in (wrapper remoting-invoke-with-check)
> IBM.Data.DB2.DB2Command:ExecuteNonQueryInternal
> (System.Data.CommandBehavior)
> in <0x0003f> IBM.Data.DB2.DB2Command:ExecuteReader (CommandBehavior
> behavior)
> in (wrapper remoting-invoke-with-check)
> IBM.Data.DB2.DB2Command:ExecuteReader (System.Data.CommandBehavior)
> in <0x0000f> IBM.Data.DB2.DB2Command:ExecuteReader ()
> in (wrapper remoting-invoke-with-check)
> IBM.Data.DB2.DB2Command:ExecuteReader ()in <0x000ed> MainClass:Main
> (System.String[] args)
> 
> 
> I've tried the methods ExecuteReader and the method Fill of
> DB2DataAdapter, also tried to insert data in the database with the
> ExecuteNonQuery method, but I always have that exception with the same
> error message.
> 
> I can open and close the connection and there is no errors with the
> open and close method.
> 
> The SQL commands are correct because they works in the DB2 commands console.
> I have installed DB2 in linux and windows, and I've executed the code
> in both S.O. with local an remote DB, and It can connects to the DB
> but with those methods of the DB2Command class that exception is
> always thrown.
> 
> Can this be a problem with Mono or the DB2 client?
> There's any problem with those methods of the DB2Command class?
> 
> Thanks for the help.
> Pablo.
> 
> 
>



More information about the Mono-devel-list mailing list