[Mono-bugs] [Bug 75123][Nor] Changed - [PATCH] GetChanges() throws NoNullAllowedException

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jun 3 07:07:24 EDT 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 george.barbarosie at gmail.com.

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

--- shadow/75123	2005-06-02 11:45:09.000000000 -0400
+++ shadow/75123.tmp.22337	2005-06-03 07:07:24.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 75123
 Product: Mono: Class Libraries
 Version: 1.1
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: Sys.Data
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: george.barbarosie at gmail.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
@@ -105,6 +105,38 @@
 -                       copyTable.Rows.Add (newRow);
                         row.CopyValuesToRow (newRow);
                         newRow.XmlRowID = row.XmlRowID;
 +                       copyTable.Rows.Add (newRow);
                         addedRows.Add (row,row);
                 }
+
+------- Additional Comments From george.barbarosie at gmail.com  2005-06-03 07:07 -------
+Previously proposed patch was breaking GetChanges() on datasets with
+deleted rows, by trhowing exception:
+
+Unhandled Exception: System.Data.DeletedRowInaccessibleException: This
+DataRow has been deleted
+in <0x001aa> System.Data.DataRow:BeginEdit ()
+in <0x00049> System.Data.DataRowCollection:Add (System.Data.DataRow row)
+in <0x001ae> System.Data.DataSet:AddChangedRow
+(System.Collections.Hashtable addedRows, System.Data.DataSet copySet,
+System.Data.DataTable copyTable, IEnumerator relations,
+System.Data.DataRow row)
+in <0x0018f> System.Data.DataSet:GetChanges (DataRowState rowStates)
+in <0x0000f> System.Data.DataSet:GetChanges ()
+
+Corrected patch is:
+
+Index: mcs/class/System.Data/System.Data/DataSet.cs
+===================================================================
+--- mcs/class/System.Data/System.Data/DataSet.cs        (revision 45328)
++++ mcs/class/System.Data/System.Data/DataSet.cs        (working copy)
+@@ -513,7 +513,7 @@
+                        }
+
+                        DataRow newRow = copyTable.NewRow ();
+-                       copyTable.Rows.Add (newRow);
++                       copyTable.Rows.AddInternal (newRow);
+                        row.CopyValuesToRow (newRow);
+                        newRow.XmlRowID = row.XmlRowID;
+                        addedRows.Add (row,row);
+


More information about the mono-bugs mailing list