Author: kostat
Date: 2007-01-16 09:54:59 -0500 (Tue, 16 Jan 2007)
New Revision: 71138

Modified:
   
branches/mainsoft/gh20preview2/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlCommand.cs
Log:
merge -r 71135:71136

Modified: 
branches/mainsoft/gh20preview2/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlCommand.cs
===================================================================
--- 
branches/mainsoft/gh20preview2/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlCommand.cs
        2007-01-16 14:54:14 UTC (rev 71137)
+++ 
branches/mainsoft/gh20preview2/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlCommand.cs
        2007-01-16 14:54:59 UTC (rev 71138)
@@ -87,11 +87,14 @@
                public override string CommandText {
                        get {
                                string commandText = base.CommandText;
-                               if (CommandType != CommandType.StoredProcedure 
|| string.IsNullOrEmpty (commandText))
+                               if (CommandType != CommandType.StoredProcedure 
||
+                                       string.IsNullOrEmpty (commandText) ||
+                                       commandText [0] == '[' ||
+                                       commandText.IndexOf ('.') >= 0)
                                        return commandText;
 
                                string trimmedCommandText = commandText.TrimEnd 
();
-                               if (commandText [0] != '[' && 
trimmedCommandText.Length > 0 && trimmedCommandText [trimmedCommandText.Length 
- 1] != ')')
+                               if (trimmedCommandText.Length > 0 && 
trimmedCommandText [trimmedCommandText.Length - 1] != ')')
                                        commandText = String.Concat ("[", 
commandText, "]");
 
                                return commandText;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to