/[AnywhereTS-MSSQL]/trunk/AnywhereTS.DBSupport/SqlMdfConnector.cs
ViewVC logotype

Diff of /trunk/AnywhereTS.DBSupport/SqlMdfConnector.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/AnywhereTS.DBSupport/SqlMdfConnector.cs	2012/07/15 05:00:59	133
+++ trunk/AnywhereTS.DBSupport/SqlMdfConnector.cs	2012/07/15 05:13:20	134
@@ -42,10 +42,12 @@
                 foreach (var command in commands)
                 {
                     Logging.DatabaseLog.DebugFormat("Current Command={0}", command);
+                    SqlConnection sqlCon;
+                    this.GetConnectionClone(out sqlCon, out ErrorInfo);
                     SqlCommand sqlcmd = new SqlCommand(command, this.connection);
+                    sqlcmd.CommandText = command;
+                    sqlcmd.Connection = sqlCon;
                     sqlcmd.CommandType = System.Data.CommandType.Text;
-                    if (ErrorInfo != null)
-                        throw ErrorInfo;
                     sqlcmd.ExecuteNonQuery();
                 }
                 return true;
@@ -53,7 +55,7 @@
             catch (Exception ex)
             {
                 ErrorInfo = ex;
-                return false;
+                throw ErrorInfo;
             }
         }
     }

 

  ViewVC Help
Powered by ViewVC 1.1.22