[Mono-bugs] [Bug 77267][Maj] New - System.Data.RowNotInTableException when executing DataRow.ItemArray

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Jan 15 09:03:37 EST 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 vigs at lycos.com.

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

--- shadow/77267	2006-01-15 09:03:37.000000000 -0500
+++ shadow/77267.tmp.31753	2006-01-15 09:03:37.000000000 -0500
@@ -0,0 +1,73 @@
+Bug#: 77267
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: Ubuntu
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Sys.Data
+AssignedTo: tsenganal at novell.com                            
+ReportedBy: vigs at lycos.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.Data.RowNotInTableException when executing DataRow.ItemArray
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Executing DataRow.ItemArray throws the following exception:
+
+Unhandled Exception: System.Data.RowNotInTableException: This row has been
+removed from a table and does not have any data.  BeginEdit() will allow
+creation of new data in this row.
+in <0x001fc> System.Data.DataRow:get_ItemArray ()
+in <0x0017b> test:Main (System.String[] args)
+
+
+Steps to reproduce the problem:
+Run this code...
+[code]
+using System;
+using System.Data;
+
+public class test
+{
+	public static void Main(string[] args)
+	{
+		DataTable dt = new DataTable("Customers");
+
+		DataColumn name = new DataColumn("Name",
+System.Type.GetType("System.String"));
+		dt.Columns.Add(name);
+		DataColumn address = new DataColumn("Address",
+System.Type.GetType("System.String"));
+		dt.Columns.Add(address);
+		DataColumn phone = new DataColumn("Phone",
+System.Type.GetType("System.String"));
+		dt.Columns.Add(phone);
+
+		DataRow dr = dt.NewRow();
+		dr["Name"] = "myName";
+		dr["Address"] = "myAddress";
+		dr["Phone"] = "myPhone";
+
+		object[] obj = dr.ItemArray;
+	}
+}
+[/code]
+
+Actual Results:
+System.Data.RowNotInTableException is throw upon executing
+[code]object[] obj = dr.ItemArray;[/code]
+
+Expected Results:
+Return all of the values for this row through an array.
+
+How often does this happen? 
+Always.
+
+Additional Information:


More information about the mono-bugs mailing list