/[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

revision 153 by william, Sun Jul 15 05:13:20 2012 UTC revision 154 by william, Sun Jul 15 13:27:58 2012 UTC
# Line 15  namespace AnywhereTS.DBSupport Line 15  namespace AnywhereTS.DBSupport
15              ErrorInfo = null;              ErrorInfo = null;
16              try              try
17              {              {
18                  string connetionString = GetConnectionString();                  string connetionString = GetConnectionString(DBServerAddress, DBServerInstance, DBDatabase);
19                  using (log4net.NDC.Push(string.Format("connetionString={0}", connetionString)))                  using (log4net.NDC.Push(string.Format("connetionString={0}", connetionString)))
20                  {                  {
21                      Logging.DatabaseLog.Debug("Creating Connection");                      Logging.DatabaseLog.Debug("Creating Connection");
# Line 28  namespace AnywhereTS.DBSupport Line 28  namespace AnywhereTS.DBSupport
28              catch (Exception ex) { Console.WriteLine(ex.ToString()); ErrorInfo = ex; throw ErrorInfo; }              catch (Exception ex) { Console.WriteLine(ex.ToString()); ErrorInfo = ex; throw ErrorInfo; }
29          }          }
30    
31          new public static string GetConnectionString()          public static string GetConnectionString(string server, string instance, string database)
32          {          {
33              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);
34          }          }
35    
36          protected override bool ClientRunScript(string strFile, out Exception ErrorInfo)          protected override bool ClientRunScript(string strFile, out Exception ErrorInfo)

Legend:
Removed from v.153  
changed lines
  Added in v.154

  ViewVC Help
Powered by ViewVC 1.1.22