ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/AnywhereTS-MSSQL/trunk/AnywhereTS.DBSupport/SqlMdfConnector.cs
(Generate patch)

Comparing trunk/AnywhereTS.DBSupport/SqlMdfConnector.cs (file contents):
Revision 127 by william, Sat Jul 14 11:44:52 2012 UTC vs.
Revision 128 by william, Sat Jul 14 13:01:52 2012 UTC

--- trunk/AnywhereTS.DBSupport/SqlMdfConnector.cs	2012/07/14 11:46:04	127
+++ trunk/AnywhereTS.DBSupport/SqlMdfConnector.cs	2012/07/14 13:01:52	128
@@ -33,11 +33,12 @@ namespace AnywhereTS.DBSupport
         {
             ErrorInfo = null;
             try
-            {                
+            {
                 var commands = Regex.Split(strFile, string.Format(@"^GO${0}", System.Environment.NewLine), RegexOptions.IgnoreCase | RegexOptions.Multiline);
                 foreach (var command in commands)
                 {
                     SqlCommand sqlcmd = this.CreateCommandInstance(command, new List<SqlParameter>(), out ErrorInfo);
+                    sqlcmd.CommandType = System.Data.CommandType.Text;
                     if (ErrorInfo != null)
                         throw ErrorInfo;
                     sqlcmd.ExecuteNonQuery();