[Mono-bugs] [Bug 70408][Nor] New - OracleCommand.ExecuteReader fails with non query

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 9 Dec 2004 22:19:49 -0500 (EST)


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 danielmorgan@verizon.net.

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

--- shadow/70408	2004-12-09 22:19:49.000000000 -0500
+++ shadow/70408.tmp.28498	2004-12-09 22:19:49.000000000 -0500
@@ -0,0 +1,98 @@
+Bug#: 70408
+Product: Mono: Class Libraries
+Version: 1.0
+OS: 
+OS Details: Windows XP Pro SP2
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: danielmorgan@verizon.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: OracleCommand.ExecuteReader fails with non query
+
+Description of Problem:
+
+OracleCommand.ExecuteReader with a nonquery, such as, CREATE TABLE or ALTER
+SESSION causes an OracleException with SQL Error
+
+ORA-24333: zero iteration count
+
+
+Steps to reproduce the problem:
+1. Run test case
+
+
+Actual Results:
+
+
+danmorg@danpc ~/monosvn/sqlsharpgtk/sqlsharpgtk
+$ mcs test.cs /r:System.Data.dll /r:System.Data.OracleClient.dll
+Compilation succeeded
+
+danmorg@danpc ~/monosvn/sqlsharpgtk/sqlsharpgtk
+$ mono test.exe
+
+Unhandled Exception: System.Data.OracleClient.OracleException: ORA-24333:
+zero i teration count
+
+in <0x001b6> System.Data.OracleClient.Oci.OciStatementHandle:Execute
+(bool,bool)
+
+in <0x00015> System.Data.OracleClient.Oci.OciStatementHandle:ExecuteQuery
+() in <0x000be> System.Data.OracleClient.OracleCommand:ExecuteReader
+(System.Data.C
+ommandBehavior)
+in <0x00010> System.Data.OracleClient.OracleCommand:ExecuteReader () in
+<0x0004d> (wrapper remoting-invoke-with-check)
+System.Data.OracleClient.Oracl eCommand:ExecuteReader () in <0x00080>
+OracleTest:Main (string[])
+
+
+Expected Results:
+
+Execute without errors like the System.Data.OracleClient that is included
+with Microsoft .NET 1.1
+
+How often does this happen? 
+
+Everytime.
+
+Additional Information:
+
+Test case:
+
+using System;
+using System.Data;
+using System.Data.OracleClient;
+
+public class OracleTest 
+{
+	public static void Main (string[] args) 
+	{
+		OracleConnection con = new OracleConnection();
+		con.ConnectionString = "data source=palis;user id=scott;password=tiger";
+		con.Open ();
+		OracleCommand cmd = con.CreateCommand ();
+		cmd.CommandText = @"alter session set nls_date_format = 'YYYY-MM-DD
+HH24:MI:SS'";
+
+		OracleDataReader reader =  cmd.ExecuteReader ();
+
+		if (reader.FieldCount > 0) 
+		{
+			while (reader.Read ()) 
+			{
+				string ename = reader["ENAME"].ToString ();
+				Console.WriteLine("ename:" + ename);
+			}
+		}
+		reader.Close ();
+		con.Close ();
+	}
+}