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

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

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

--- trunk/AnywhereTS.DBSupport/DBConnector.cs	2012/07/14 09:40:33	121
+++ trunk/AnywhereTS.DBSupport/DBConnector.cs	2012/07/14 11:14:09	123
@@ -5,6 +5,8 @@
 using System.Data.Common;
 using System.Data;
 using System.Text.RegularExpressions;
+using System.IO;
+
 
 namespace AnywhereTS.DBSupport
 {
@@ -299,12 +301,8 @@
         }
         #endregion
         #region public string[] ParseScriptToCommands(string strScript)
-        public string[] ParseScriptToCommands(string strScript)
-        {
-            string[] commands;
-            commands = strScript.Split(new string[] { string.Format("GO{0}", System.Environment.NewLine) }, StringSplitOptions.RemoveEmptyEntries);
-            return commands;
-        }
+     
+        protected abstract bool ClientRunScript(string strFile, out Exception ErrorInfo);
         #endregion
         #region public virtual bool RunScript(string strFile, out Exception ErrorInfo)
         public bool RunScript(string strFile, out Exception ErrorInfo)
@@ -312,11 +310,9 @@
             ErrorInfo = null;
             try
             {
-                string[] strCommands;
-                strCommands = ParseScriptToCommands(strFile);
                 if (this.ConnectionIsOpen)
                 {
-                    if (!ClientRunScript(strCommands, out ErrorInfo))
+                    if (!ClientRunScript(strFile, out ErrorInfo))
                     {
                         return false;
                     }
@@ -345,7 +341,6 @@
             }
             return false;
         }
-        public abstract bool ClientRunScript(string[] strCommands, out Exception ErrorInfo);
         #endregion
         #endregion
 

 

  ViewVC Help
Powered by ViewVC 1.1.22