[Mono-bugs] [Bug 78103][Nor] New - SqlCommand incorrectly assumes ; is valid syntax.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Apr 13 19:41:43 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 mike.hull at coversant.net.

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

--- shadow/78103	2006-04-13 19:41:43.000000000 -0400
+++ shadow/78103.tmp.31674	2006-04-13 19:41:43.000000000 -0400
@@ -0,0 +1,45 @@
+Bug#: 78103
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Data.SqlClient
+AssignedTo: tsenganal at novell.com                            
+ReportedBy: mike.hull at coversant.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: SqlCommand incorrectly assumes ; is valid syntax.
+
+Description of Problem:
+
+System.Data.SqlClient.SqlCommand adds ; to the end of the command.  This
+causes problems if ; is not valid syntax. 
+
+The function I was trying to add is here:  http://pastebin.com/658670
+
+Steps to reproduce the problem:
+1. SqlCommand comm = new SqlCommand("CREATE FUNCTION ... ")
+2. comm.ExecuteNonQuery();
+
+Actual Results:
+SqlException... Incorrect syntax near ';'.
+
+Expected Results:
+No error.
+
+How often does this happen? 
+Every time.
+
+Additional Information:
+Sorry I didn't have time to create a patch for this today.  A refactor of
+the Execute code that changes {0}{1};{2} to {0}{1}{2}, moving ; to the sql2
+StringBuilder should be sufficient.
+
+Work around:
+Thanks to robertj, workaround is to add -- to the end of the command.


More information about the mono-bugs mailing list