[Mono-bugs] [Bug 530954] System.Data OracleClient - Timestamp parameter regression - exception when calling stored proc

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Aug 21 08:38:03 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=530954

User vvaradhan at novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=530954#c1





--- Comment #1 from Veerapuram Varadhan <vvaradhan at novell.com>  2009-08-21 06:38:00 MDT ---
Can you paste a sample stored procedure?  I tried the following and it didn't
raise any exception.


public class Ora_530954_Test {
       public static void Main (string[] args) {
           string conStr = "Data Source=localhost; User Id=userid;
Password=password";
           string createSPIDS =
               "CREATE OR REPLACE PROCEDURE bug530954 ( timestampval IN
TIMESTAMP )\n" +
               "AS\n" +
               "BEGIN\n" +
               "DBMS_OUTPUT.PUT_LINE (timestampval);\n" +
               "END;\n";

           OracleConnection con1 = new OracleConnection ();
           con1.ConnectionString = conStr;
           con1.Open ();

           Console.Write ("Creating SP...");
           OracleCommand cmd = new OracleCommand ();
           cmd.CommandText = createSPIDS;
           cmd.CommandType = CommandType.Text;
           cmd.Connection = con1;
           cmd.ExecuteNonQuery ();
           Console.WriteLine (" done");

           Console.Write ("Committing... ");
           cmd.CommandText = "commit";
           cmd.ExecuteNonQuery ();
           Console.WriteLine ("done");

           OracleParameter param0 = new OracleParameter ();
           param0.ParameterName = "timestampval";
           param0.OracleType = OracleType.Timestamp;
           param0.Direction = ParameterDirection.Input;
           param0.Value = DateTime.Now;
           cmd.Parameters.Add (param0);

           cmd.CommandText = "bug530954";
           cmd.CommandType = CommandType.StoredProcedure;
           cmd.ExecuteNonQuery ();

           cmd.Dispose ();
           con1.Close ();
       }
}

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list