[Mono-bugs] [Bug 77105][Wis] New - NotImplementedException while
compile with gmcs under 1.1.12.1
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Dec 27 14:22:51 EST 2005
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 cartuchogl at unrealspace.com.
http://bugzilla.ximian.com/show_bug.cgi?id=77105
--- shadow/77105 2005-12-27 14:22:51.000000000 -0500
+++ shadow/77105.tmp.11073 2005-12-27 14:22:51.000000000 -0500
@@ -0,0 +1,99 @@
+Bug#: 77105
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Sys.Data
+AssignedTo: tsenganal at novell.com
+ReportedBy: cartuchogl at unrealspace.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: NotImplementedException while compile with gmcs under 1.1.12.1
+
+This piece of code run fine with mono 1.1.9 compiled with gmcs, but with
+1.1.12.1 throw an exception System.NotImplementedException, the same app
+compiled with mcs not fail.
+
+//* gmcs -warn:4 Example10.cs -r:System.Data -r:Npgsql */
+using System;
+using System.Data;
+using Npgsql;
+/*
+CREATE TABLE table2(
+ field_int2 int2,
+ field_timestamp timestamp,
+ field_numeric numeric
+);
+*/
+public class Example10 {
+ public static void Main() {
+ string strCon =
+ "Server=localhost;"+
+ "User Id=postgres;"+
+ "Password=xxxx;"+
+ "Database=tests;";
+ NpgsqlConnection conn = new NpgsqlConnection(strCon);
+ conn.Open();
+
+ NpgsqlDataAdapter da = new NpgsqlDataAdapter();
+ DataSet ds = new DataSet();
+ string strCommand = "SELECT * FROM table2 WHERE 1=2";
+ NpgsqlCommand selCommand = new NpgsqlCommand(strCommand,conn);
+ selCommand.CommandType = CommandType.Text;
+
+ strCommand = "INSERT INTO table2 "+
+ "(field_int2,field_timestamp,field_numeric) "+
+ "VALUES (:a, :b, :c)";
+ NpgsqlCommand insCommand = new NpgsqlCommand(strCommand,conn);
+
+ insCommand.Parameters.Add
+ (new NpgsqlParameter("a", DbType.Int16));
+ insCommand.Parameters.Add
+ (new NpgsqlParameter("b", DbType.DateTime));
+ insCommand.Parameters.Add
+ (new NpgsqlParameter("c", DbType.Decimal));
+
+ insCommand.Parameters[0].Direction =
+ insCommand.Parameters[1].Direction =
+ insCommand.Parameters[2].Direction =
+ ParameterDirection.Input;
+
+ insCommand.Parameters[0].SourceColumn =
+ "field_int2";
+ insCommand.Parameters[1].SourceColumn =
+ "field_timestamp";
+ insCommand.Parameters[2].SourceColumn =
+ "field_numeric";
+
+ da.SelectCommand = selCommand;
+ da.InsertCommand = insCommand;
+ da.Fill(ds,"table2");
+
+ DataTable dt = ds.Tables["table2"];
+
+ DataRow dr = dt.NewRow();
+ dr["field_int2"] = 4;
+ dr["field_timestamp"] = new DateTime(2003, 03, 03, 14, 0, 0);
+ dr["field_numeric"] = 7.3M;
+
+ dt.Rows.Add(dr);
+ da.Update(ds,"table2");
+ conn.Close();
+ }
+}
+
+Output is:
+Unhandled Exception: System.NotImplementedException: The requested feature
+is not implemented.
+in <0x0001d> System.Data.Common.DbDataAdapter:get_SelectCommand ()
+in <0x0001a> System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet
+dataSet, System.String srcTable)
+in (wrapper remoting-invoke-with-check)
+System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet,string)
+in <0x0031e> Example10:Main ()
More information about the mono-bugs
mailing list