[Mono-bugs] [Bug 77776][Nor] New - SqlDataAdapter.Update() clears modified rows when it should not

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Mar 13 11:51:15 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 prensing at cimetrics.com.


--- shadow/77776	2006-03-13 11:51:14.000000000 -0500
+++ shadow/77776.tmp.30326	2006-03-13 11:51:14.000000000 -0500
@@ -0,0 +1,52 @@
+Bug#: 77776
+Product: Mono: Class Libraries
+Version: 1.1
+OS Details: Fedora Core 4
+Status: NEW   
+Priority: Normal
+Component: Sys.Data
+AssignedTo: tsenganal at novell.com                            
+ReportedBy: prensing at cimetrics.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: SqlDataAdapter.Update() clears modified rows when it should not
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+If I call SqlDataAdapter.Update( DataTable ) to update the version in the
+database, the modified rows get set to unmodified (ie the flag is changed).
+I don't think this is the correct behaviour (MS .NET does not clear the flag).
+Because we are using DataSets with foreign key relations, the default
+Update methods don't work. We created a wrapper library which does the
+update in two passes. It goes through the tables in child-to-parent order
+and performs all row deletion first. Then it goes through again in
+parent-to-child order and performs insertions and updates.
+The attached program demonstrates it for a single table.
+Steps to reproduce the problem:
+1. Run the attached program
+Actual Results:
+After the DELETE pass, the DataTable reports no modified rows. The INSERT
+pass does nothing because there are no modified rows.
+Expected Results:
+The DELETE pass should do nothing. The INSERT pass should get the row into
+the database. The DataTable should still report 1 modified row at the end.
+How often does this happen? 
+Additional Information:
+I am running Fedora Core 4 with the Novell RPMS, version I am
+compiling using "gmcs".

More information about the mono-bugs mailing list