[Mono-list] System.Data.OracleClient on z/Linux

Edwin Kim EKIM at transitchicago.com
Thu Feb 7 12:12:06 EST 2008

Hello mono-list,

I tried to access the Oracle Data Source using System.Data.OracleClient from z/linux (s390x),
and I get this Error-Message:

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at System.Data.OracleClient.Oci.OciStatementHandle.Prepare (System.String commandText) [0x00000]
  at System.Data.OracleClient.OracleCommand.PrepareStatement (System.Data.OracleClient.Oci.OciStatementHandle statement) [0x00000]
  at System.Data.OracleClient.OracleCommand.ExecuteReader (CommandBehavior behavior) [0x00000]
  at System.Data.OracleClient.OracleCommand.ExecuteReader () [0x00000]
  at (wrapper remoting-invoke-with-check) System.Data.OracleClient.OracleCommand:ExecuteReader ()
  at Test.Main (System.String[] args) [0x00000]

the code:
 using System;
 using System.Data;
 using System.Data.OracleClient;

 public class Test
    public static void Main (string[] args)
       string connectionString =
          "Data Source=wpsdb;" +
          "User ID=test;" +
       OracleConnection dbcon = null;
       dbcon = new OracleConnection (connectionString);
       dbcon.Open ();

       OracleCommand dbcmd = dbcon.CreateCommand ();
       string sql = "SELECT * FROM dual";
       dbcmd.CommandText = sql;
       OracleDataReader reader = dbcmd.ExecuteReader ();
       // clean up
       reader.Close ();
       reader = null;
       dbcmd.Dispose ();
       dbcmd = null;
       dbcon.Close ();
       dbcon = null;

OS:  z/linux (sles10 sp1) with mono-data-oracle-1.2.2-12.12 and installed Oracle instantclient 10.2

compiled: mcs test1.cs /r:System.Data.dll /r:System.Data.OracleClient.dll
run:          mono test1.exe

Did I forget something ?
or will the System.Data.OracleClient not work with on z/Linux environment?

Best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20080207/21e286ef/attachment-0001.html 

More information about the Mono-list mailing list