On Tue, 2003-04-01 at 23:59, David Pickens wrote: > 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!
David, Since the Oracle provider *does* work for you with SQL#, and it seems in the first example that the error is occuring in OciServerHandle.Attach(), I think that there may be a problem with your connection string. If you could send me the details, perhaps I could check it out. In the second example, it almost seems that it can't find the Oracle client libraries that you have installed. Not knowing much about mod_mono, I can't really say why that may be, but you might want to check out the LD_LIBRARY_PATH or somesuch for the apache user. Cheers, -- Tim Coleman <[EMAIL PROTECTED]> [43.43 N 80.45 W] BMath, Honours Combinatorics and Optimization, University of Waterloo Software Developer, Global Services, Open Text Corporation "Under capitalism, man exploits man. Under communism, it's just the opposite." -- J.K. Galbraith _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
