[Mono-bugs] [Bug 82203][Maj] New - The exe for the Oracle Sample Console App compiled with Visual Studio 2005 does not work

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jul 27 11:43:59 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by andreas.schurz at dp-itsolutions.de.

http://bugzilla.ximian.com/show_bug.cgi?id=82203

--- shadow/82203	2007-07-27 11:43:59.000000000 -0400
+++ shadow/82203.tmp.11276	2007-07-27 11:43:59.000000000 -0400
@@ -0,0 +1,118 @@
+Bug#: 82203
+Product: Mono: Class Libraries
+Version: 1.2
+OS: Windows XP
+OS Details: Windows XP Professional, Fedora Core 7
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Sys.Data.SqlClient
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: andreas.schurz at dp-itsolutions.de               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: The exe for the Oracle Sample Console App compiled with Visual Studio 2005 does not work
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+
+The exe for the Oracle Sample Console App compiled with Visual Studio 2005 
+does not work.
+
+This sourcecode:
+----------------
+
+using System;
+using System.Data;
+using System.Data.OracleClient;
+
+public class OracleConsole
+{
+    public static void Main(string[] args)
+    {
+            string connectionString =
+               "Data Source=fedora.itservices;" +
+               "User ID=system;" +
+               "Password=manager;";
+            OracleConnection dbcon = null;
+            dbcon = new OracleConnection(connectionString);
+            dbcon.Open();
+            OracleCommand dbcmd = dbcon.CreateCommand();
+            string sql = "SELECT ename, job FROM scott.emp";
+            dbcmd.CommandText = sql;
+            OracleDataReader reader = dbcmd.ExecuteReader();
+            while (reader.Read())
+            {
+                string employeeName = (string)reader["ename"];
+                string job = (string)reader["job"];
+                Console.WriteLine("Employee Name: {0}  Job: {1}",
+                                  employeeName, job);
+            }
+            // clean up
+            reader.Close();
+            reader = null;
+            dbcmd.CommandText = sql;
+            dbcmd.ExecuteNonQuery();
+            dbcmd.Dispose();
+            dbcmd = null;
+            dbcon.Close();
+            dbcon = null;
+    }
+}
+
+
+Steps to reproduce the problem:
+1. Run the exe with mono
+2. 
+3. 
+
+Actual Results:
+D:\Visual Studio Projects\OracleConsole\OracleConsole\bin\Debug>mono 
+OracleConso
+le.exe
+
+Unhandled Exception: System.InvalidOperationException: An open Connection 
+object
+ is required to continue.
+  at System.Data.OracleClient.OracleCommand.AssertConnectionIsOpen () 
+[0x00000]
+
+  at System.Data.OracleClient.OracleCommand.ExecuteReader (CommandBehavior 
+behav
+ior) [0x00000]
+  at System.Data.OracleClient.OracleCommand.ExecuteReader () [0x00000]
+  at (wrapper remoting-invoke-with-check) 
+System.Data.OracleClient.OracleCommand
+:ExecuteReader ()
+  at OracleConsole.Main (System.String[] args) [0x00000]
+
+Expected Results:
+D:\Visual Studio 
+Projects\OracleConsole\OracleConsole\bin\Debug>OracleConsole.ex
+e
+Employee Name: SMITH  Job: CLERK
+Employee Name: ALLEN  Job: SALESMAN
+Employee Name: WARD  Job: SALESMAN
+Employee Name: JONES  Job: MANAGER
+Employee Name: MARTIN  Job: SALESMAN
+Employee Name: BLAKE  Job: MANAGER
+Employee Name: CLARK  Job: MANAGER
+Employee Name: SCOTT  Job: ANALYST
+Employee Name: KING  Job: PRESIDENT
+Employee Name: TURNER  Job: SALESMAN
+Employee Name: ADAMS  Job: CLERK
+Employee Name: JAMES  Job: CLERK
+Employee Name: FORD  Job: ANALYST
+Employee Name: MILLER  Job: CLERK
+
+How often does this happen? 
+Everytime.
+
+Additional Information:
+The same problem occurs on Mono Windows and Mono Linux. The database used 
+is Oracle 10g on Linux. The access works fine under Windows with 
+Microsoft .NET 2.0.


More information about the mono-bugs mailing list