[Mono-bugs] [Bug 79631][Nor] New - Third and next output parameters are DBNull values
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Oct 10 05:37:25 EDT 2006
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 pawel.mielnik at mobiltek.pl.
http://bugzilla.ximian.com/show_bug.cgi?id=79631
--- shadow/79631 2006-10-10 05:37:25.000000000 -0400
+++ shadow/79631.tmp.30700 2006-10-10 05:37:25.000000000 -0400
@@ -0,0 +1,105 @@
+Bug#: 79631
+Product: Mono: Class Libraries
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: Debian Unstable, 2.6.8
+Status: NEW
+Resolution:
+Severity: 080 Two weeks
+Priority: Normal
+Component: Sys.Data
+AssignedTo: tsenganal at novell.com
+ReportedBy: pawel.mielnik at mobiltek.pl
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Third and next output parameters are DBNull values
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+
+Database: Oracle XE 10.2.0.1.0
+Mono: 1.1.17.2
+
+When I run simple application which executes very simple stored procedure
+with more than two output parameters, I always get DBNull value for the
+third and next parameters. First and second parameter are fine, they got
+good values.
+
+This is a source code of this application:
+
+public static void Main(string[] args)
+{
+ OracleConnection oracleConnection = new OracleConnection("User
+ID=dbo;Password=dbo;Server=ip_address;");
+
+ oracleConnection.Open();
+ OracleCommand oracleCommand = new OracleCommand("SP_SIMPLE_TEST",
+oracleConnection);
+ oracleCommand.CommandType = CommandType.StoredProcedure;
+
+ OracleParameter parameter = new OracleParameter("P1",
+OracleType.Number);
+ parameter.Direction = ParameterDirection.Output;
+ oracleCommand.Parameters.Add(parameter);
+
+ parameter = new OracleParameter("P2", OracleType.Number);
+ parameter.Direction = ParameterDirection.Output;
+ oracleCommand.Parameters.Add(parameter);
+
+ parameter = new OracleParameter("P3", OracleType.Number);
+ parameter.Direction = ParameterDirection.Output;
+ oracleCommand.Parameters.Add(parameter);
+
+ oracleCommand.ExecuteNonQuery();
+
+ Console.WriteLine("Parameter 1: " + Convert.IsDBNull
+(oracleCommand.Parameters["P1"].Value));
+ Console.WriteLine("Parameter 2: " + Convert.IsDBNull
+(oracleCommand.Parameters["P2"].Value));
+ Console.WriteLine("Parameter 3: " + Convert.IsDBNull
+(oracleCommand.Parameters["P3"].Value));
+
+ oracleConnection.Close();
+ Console.ReadLine();
+}
+
+This is stored procedure:
+
+CREATE OR REPLACE PROCEDURE SP_SIMPLE_TEST(
+P1 OUT NUMBER,
+P2 OUT NUMBER,
+P3 OUT NUMBER)
+
+AS
+BEGIN
+ P1:=1;
+ P2:=2;
+ P3:=3;
+
+END SP_SIMPLE_TEST;
+/
+
+Steps to reproduce the problem:
+1. Run the above application
+
+Actual Results:
+
+Parameter 1:False
+Paremeter 2:False
+Parameter 3:True
+
+
+Expected Results:
+
+Parameter 1:False
+Paremeter 2:False
+Parameter 3:False
+
+How often does this happen?
+Always
+
+Additional Information:
+Compiled using gmcs
More information about the mono-bugs
mailing list