/[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/13 21:10:26	85
+++ trunk/AnywhereTS.DBSupport/SqlMdfConnector.cs	2012/07/13 22:56:50	89
@@ -15,12 +15,17 @@
             try
             {
                 string connetionString = null;
-                connetionString = string.Format(@"Data Source={0}\{1};;AttachDbFilename=|DataDirectory|\{2};Integrated Security=SSPI", DBServerAddress, DBServerInstance, DBDatabase);
+                connetionString = GetConnectionString();
                 connection = new SqlConnection();
                 connection.ConnectionString = connetionString;
             }
             //catch (SqlException ex) { Console.WriteLine(ex.ToString()); ErrorInfo = ex;  throw ErrorInfo;}
             catch (Exception ex) { Console.WriteLine(ex.ToString()); ErrorInfo = ex; throw ErrorInfo; }
         }
+
+        new public static string GetConnectionString()
+        {
+            return string.Format(@"Data Source={0}\{1};;AttachDbFilename=|DataDirectory|\{2};Integrated Security=SSPI", DBServerAddress, DBServerInstance, DBDatabase);
+        }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22