[Mono-list] Help with ADO.NET Oracle client

David Pickens dsp@rci.rutgers.edu
Tue, 01 Apr 2003 23:59:31 -0500


Let me say first that I'm new to mono, and relatively new to C# (moving 
from C++), so the following problems could be a result of my 
inexperience, but I can't seem to get the sample code from go-mono.org 
to work, nor does my attempt in my own code to open the database 
connection work.  (However, using sqlsharp, /Provider Oracle, and a 
valid connection string *does* work on the system, and I do have oracle 
installed and working correctly on the system in question.)

I've corrected the missing casting to strings in the demo code, but when 
it does compile successfully, and the connection string is valid I get:

Unhandled Exception: System.NullReferenceException: A null value was 
found where an object instance was required
in <0x00018> 00 System.Data.OracleClient.Oci.OciServerHandle:Attach ()
in <0x00470> 00 System.Data.OracleClient.Oci.OciGlue:CreateConnection 
(System.Data.OracleClient.OracleConnectionInfo)
in <0x0008e> 00 System.Data.OracleClient.OracleConnection:Open ()
in <0x00095> 00 .Test:Main (string[])
 
My own connection code, in an ASP.NET page used by mod_mono/apache2 returns:

System.MissingMethodException: A missing method exception has occurred.
in <0x00046> 06 
System.Data.OracleClient.Oci.OciEnvironmentHandle:OCIEnvCreate 
(intptr&,System.Data.OracleClient.Oci.OciEnvironmentMode,intptr,intptr,intptr,intptr,int,intptr)
in <0x00063> 00 System.Data.OracleClient.Oci.OciEnvironmentHandle:.ctor 
(System.Data.OracleClient.Oci.OciEnvironmentMode)
in <0x0002c> 00 System.Data.OracleClient.Oci.OciGlue:CreateConnection 
(System.Data.OracleClient.OracleConnectionInfo)
in <0x0008e> 00 System.Data.OracleClient.OracleConnection:Open ()
in <0x00080> 00 GSNB.GSNBDataAccess:.ctor ()

The version of mono is 0.23 (debs).

Any help will be appreciated!

Thanks,

David