[Mono-bugs] [Bug 78027][Nor] New - SqlCommandBuilder creates incorrect Update and Delete commands

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Apr 5 17:11:58 EDT 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.

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

--- shadow/78027	2006-04-05 17:11:58.000000000 -0400
+++ shadow/78027.tmp.14149	2006-04-05 17:11:58.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 78027
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: Fedora Core 4
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Data
+AssignedTo: tsenganal at novell.com                            
+ReportedBy: prensing at cimetrics.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: SqlCommandBuilder creates incorrect Update and Delete commands
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+SqlCommandBuilder is supposed to create default update and delete commands
+based on a DataAdapter. The update command (and I think the delete command
+as well) is incorrect in the "where" clause.
+
+For regular columns which might be NULL, the usual clause is:
+
+    ((@p1 = 1 AND FOO IS NULL) OR (FOO = @P2 ) )
+
+The problem is that "@p1" gets set to the same value and type as @P2. For
+instance, for a VARCHAR column with value "XX", I see:
+   p1 = "XX" of type VARCHAR
+   p2 = "XX" of type VARCHAR
+
+It should be:
+   p1 = 0 of type INT
+   p2 = "XX" of type VARCHAR
+
+It looks like the author of the code got confused about the definition of
+"clause1" and "clause2" in the code, and those should be swapped. Also, the
+type of "p1" (in my example) needs to be set to INT.
+
+Steps to reproduce the problem:
+1. 
+2. 
+3. 
+
+Actual Results:
+
+
+Expected Results:
+
+
+How often does this happen? 
+
+
+Additional Information:


More information about the mono-bugs mailing list