[Mono-devel-list] IBM DB2 V8.2 and Mono IBM.Data.DB2 Provider (Linux)

Thomas Lazar ibn at nixinteressantes.de
Thu Jul 7 12:12:02 EDT 2005


Hi there.

I'm evaluating mono for my firm. Requirement is IBM DB2 V8.2 data access.

I'm using Mono 1.1.8.1, Suse Linux 9.2 Pro and DB2 V8.2 for Linux.

Well... i first encountered the problem Pablo Cardona described in 
"[Mono-devel-list] IBM DB2 db2_36.so problem". I linked libdb2.so to 
libdb2_36.so and everything seemed fine.

But now there is a new problem.

Everytime i drop a sql select which returns more then one column in the 
result set, e.g. 'select test_String1, test_String2 from dummytable', 
and try to access the data, e.g via 
Console.WriteLine(String(reader.Item['test_String1']), i get that 
exception:

Unhandled Exception: System.IndexOutOfRangeException: name
in <0x00093> IBM.Data.DB2.DB2DataReader:GetOrdinal (System.String name)
in (wrapper remoting-invoke-with-check) 
IBM.Data.DB2.DB2DataReader:GetOrdinal (string)
in <0x00013> IBM.Data.DB2.DB2DataReader:get_Item (System.String name)
in <0x0046b> db2test.Units.db2test:db2test ()

Ok. The problem is occurs in GetOrdinal i thought.

rdr.GetOrdinal('test_string1').ToString results in:

Unhandled Exception: System.IndexOutOfRangeException: name
in <0x00093> IBM.Data.DB2.DB2DataReader:GetOrdinal (System.String name)
in <0x0052a> db2test.Units.db2test:db2test ()

Is this perhaps because i'm using DB2 V8.2 as database and client and 
IBM has changed something in libdb2.so since V8.1? If i'm not mistaken 
the actual IBM.Data.DB2.dll is based on V8.1. Or why do i get this problem?

here is the source and console output from the programm i wrote to test 
the db2 access when i encounterd the problem. i know it's delphi.net 
code (my firm wants me to use it). i got the same problem with c#.

http://support.isoware.com/ISOware/db2test/db2test.dpr
http://support.isoware.com/ISOware/db2test/db2test.out

if nothing helps i'd like to try to debug the data provider myself, but 
i have no clue how to do it. if someone could point me to some howtos on 
debugging with mono, i'd really apreciate it.

bye
thomas



More information about the Mono-devel-list mailing list