/[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 13:17:36	153
+++ trunk/AnywhereTS.DBSupport/SqlMdfConnector.cs	2012/07/15 13:27:58	154
@@ -15,7 +15,7 @@
             ErrorInfo = null;
             try
             {
-                string connetionString = GetConnectionString();
+                string connetionString = GetConnectionString(DBServerAddress, DBServerInstance, DBDatabase);
                 using (log4net.NDC.Push(string.Format("connetionString={0}", connetionString)))
                 {
                     Logging.DatabaseLog.Debug("Creating Connection");
@@ -28,9 +28,9 @@
             catch (Exception ex) { Console.WriteLine(ex.ToString()); ErrorInfo = ex; throw ErrorInfo; }
         }
 
-        new public static string GetConnectionString()
+        public static string GetConnectionString(string server, string instance, string database)
         {
-            return string.Format(@"Data Source={0}\{1};AttachDbFilename=|DataDirectory|\{2};Integrated Security=SSPI", DBServerAddress, DBServerInstance, DBDatabase);
+            return string.Format(@"Data Source={0}\{1};AttachDbFilename=|DataDirectory|\{2};Integrated Security=SSPI", server, instance, database);
         }
 
         protected override bool ClientRunScript(string strFile, out Exception ErrorInfo)

 

  ViewVC Help
Powered by ViewVC 1.1.22