[Mono-bugs] [Bug 72677][Maj] Changed - Oracle : Invalid Argument in OCI call

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 17 Feb 2005 21:46:14 -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=72677

--- shadow/72677	2005-02-17 21:42:28.000000000 -0500
+++ shadow/72677.tmp.10124	2005-02-17 21:46:14.000000000 -0500
@@ -22,6 +22,53 @@
 value... (this works with ms.net too)
 
 This problem breaks the compatibility with ms.net
 
 ------- Additional Comments From danielmorgan@verizon.net  2005-02-17 21:42 -------
 reassign to me
+
+------- Additional Comments From danielmorgan@verizon.net  2005-02-17 21:46 -------
+I have duplicated your problem. 
+
+I have a test case below:
+
+// create a table like the following
+CREATE TABLE MONO_TEST_TABLE1 (
+	COL1 VARCHAR(8),
+	COL2 VARCHAR(32));
+
+
+using System;
+using System.Data;
+using System.Data.OracleClient;
+
+class TestOracleParm {
+	public static void Main (string[] args) 
+	{
+		OracleConnection con = new OracleConnection("data source=TESTDB;user
+id=USER;password=PASS");
+
+		con.Open ();
+		OracleTransaction trans = con.BeginTransaction ();
+		OracleCommand cmd = con.CreateCommand ();
+		cmd.Transaction = trans;
+
+		cmd.CommandText = "INSERT INTO MONO_TEST_TABLE1 (COL1, COL2)
+VALUES(:P1,:P2)";
+
+		OracleParameter parm1 = cmd.Parameters.Add (":P1", 
+OracleType.VarChar, 8);
+
+		OracleParameter parm2 = cmd.Parameters.Add (":P2",
+OracleType.VarChar, 32);
+
+		parm1.Value = "test";
+		parm2.Value = DBNull.Value;
+		
+		cmd.ExecuteNonQuery ();
+		trans.Commit ();
+		con.Close ();
+	}
+}
+
+
+