/[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/13 20:58:17	84
+++ trunk/AnywhereTS.DBSupport/DBConnector.cs	2012/07/13 21:10:26	85
@@ -29,9 +29,15 @@
         where DBConnection : DbConnection, new()
         where DBDataAdapter : DbDataAdapter, new()
     {
+
+        public DBConnector(string DBServerAddress, string DBServerInstance, string DBDatabase)
+        {
+        }
+
         protected DBConnection connection;
-        private static string Server = "";
-        private static string Database = "";
+        protected static string DBServerAddress = "";
+        protected static string DBServerInstance = "";
+        protected static string DBDatabase = "";
         private string SafeSqlLiteral(string inputSQL) { return inputSQL.Replace("'", "''"); }
         #region IDBConnector members
         private bool _ConnectionIsOpen;
@@ -42,7 +48,7 @@
             try
             {
                 string connetionString = null;
-                connetionString = string.Format("Data Source={0};Initial Catalog={1};Integrated Security=SSPI", Server, Database);
+                connetionString = string.Format(@"Data Source={0}\{1};Initial Catalog={2};Integrated Security=SSPI", DBServerAddress, DBServerInstance, DBDatabase);
                 connection = new DBConnection();
                 connection.ConnectionString = connetionString;
             }

 

  ViewVC Help
Powered by ViewVC 1.1.22