/[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/15 13:17:36	153
+++ trunk/AnywhereTS.DBSupport/DBConnector.cs	2012/07/15 13:27:58	154
@@ -51,9 +51,9 @@
             }
         }
 
-        public static string GetConnectionString()
+        public static string GetConnectionString(string server, string instance, string database)
         {
-            return string.Format(@"Data Source={0}\{1};Database={2};Integrated Security=SSPI", DBServerAddress, DBServerInstance, DBDatabase);
+            return string.Format(@"Data Source={0}\{1};Database={2};Integrated Security=SSPI", server, instance, database);
         }
         protected DBConnection connection;
         #region DBServerAddress, DBServerInstance, DBDatabase
@@ -120,7 +120,7 @@
             {
                 if (!this.ConnectionIsCreated)
                 {
-                    connetionString = GetConnectionString();
+                    connetionString = GetConnectionString(DBServerAddress, DBServerInstance, DBDatabase);
                     using (log4net.NDC.Push(string.Format("connetionString={0}", connetionString)))
                     {
                         Logging.DatabaseLog.Debug("Creating Connection");
@@ -166,7 +166,7 @@
                     this.CloseConnection(out ErrorInfo);
                 if (!this.ConnectionIsCreated)
                     this.CreateConnection(out ErrorInfo);
-                connetionString = GetConnectionString();
+                connetionString = GetConnectionString(DBServerAddress, DBServerInstance, DBDatabase);
                 using (log4net.NDC.Push(string.Format("connectionString={0}", connetionString)))
                 {
                     Logging.DatabaseLog.Debug("Opening Connection");

 

  ViewVC Help
Powered by ViewVC 1.1.22