/[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 88 by william, Fri Jul 13 21:10:26 2012 UTC revision 89 by william, Fri Jul 13 22:56:50 2012 UTC
# Line 15  namespace AnywhereTS.DBSupport Line 15  namespace AnywhereTS.DBSupport
15              try              try
16              {              {
17                  string connetionString = null;                  string connetionString = null;
18                  connetionString = string.Format(@"Data Source={0}\{1};;AttachDbFilename=|DataDirectory|\{2};Integrated Security=SSPI", DBServerAddress, DBServerInstance, DBDatabase);                  connetionString = GetConnectionString();
19                  connection = new SqlConnection();                  connection = new SqlConnection();
20                  connection.ConnectionString = connetionString;                  connection.ConnectionString = connetionString;
21              }              }
22              //catch (SqlException ex) { Console.WriteLine(ex.ToString()); ErrorInfo = ex;  throw ErrorInfo;}              //catch (SqlException ex) { Console.WriteLine(ex.ToString()); ErrorInfo = ex;  throw ErrorInfo;}
23              catch (Exception ex) { Console.WriteLine(ex.ToString()); ErrorInfo = ex; throw ErrorInfo; }              catch (Exception ex) { Console.WriteLine(ex.ToString()); ErrorInfo = ex; throw ErrorInfo; }
24          }          }
25    
26            new public static string GetConnectionString()
27            {
28                return string.Format(@"Data Source={0}\{1};;AttachDbFilename=|DataDirectory|\{2};Integrated Security=SSPI", DBServerAddress, DBServerInstance, DBDatabase);
29            }
30      }      }
31  }  }

Legend:
Removed from v.88  
changed lines
  Added in v.89

  ViewVC Help
Powered by ViewVC 1.1.22