[Mono-devel-list] Fixes for Oracle Client

David Pickens dsp at rci.rutgers.edu
Wed Aug 13 22:32:04 EDT 2003


I found I couldn't bind an OracleDataReader to web controls, and after 
some digging I was able to identify the problem(s):

1) GetDataTypeName in OracleDataReader was throwing out of range 
exceptions because the arraylist that was designed to hold the type 
names wasn't getting populated.
2) DbEnumerator was expecting an IsReadOnly column in the schema table 
with a valid bool value.

The attached path is designed to fix this by creating an IsReadOnly 
column in the schema table of the DataReader, and implementing the 
GetDataTypeName method.

On my machine, it works and I'm now able to bind, successfully, an 
OracleDataReader to a drop down list.

Incidentally, the sample code on the ADO page for the oracle client 
(http://www.go-mono.com/oracle.html) has a few extraneous lines toward 
the end:

       dbcmd.CommandText = sql;
       dbcmd.ExecuteNonQuery ();

The DataReader code before this works fine, but the extra lines cause an oracle exception.  
When they're removed, the sample code works properly.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: oracle_patch.diff.gz
Type: application/x-gzip
Size: 1053 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030813/4a12fa67/attachment.gz 


More information about the Mono-devel-list mailing list