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

revision 84 by william, Fri Jul 13 20:58:17 2012 UTC revision 85 by william, Fri Jul 13 21:10:26 2012 UTC
# Line 29  namespace AnywhereTS.DBSupport Line 29  namespace AnywhereTS.DBSupport
29          where DBConnection : DbConnection, new()          where DBConnection : DbConnection, new()
30          where DBDataAdapter : DbDataAdapter, new()          where DBDataAdapter : DbDataAdapter, new()
31      {      {
32    
33            public DBConnector(string DBServerAddress, string DBServerInstance, string DBDatabase)
34            {
35            }
36    
37          protected DBConnection connection;          protected DBConnection connection;
38          private static string Server = "";          protected static string DBServerAddress = "";
39          private static string Database = "";          protected static string DBServerInstance = "";
40            protected static string DBDatabase = "";
41          private string SafeSqlLiteral(string inputSQL) { return inputSQL.Replace("'", "''"); }          private string SafeSqlLiteral(string inputSQL) { return inputSQL.Replace("'", "''"); }
42          #region IDBConnector members          #region IDBConnector members
43          private bool _ConnectionIsOpen;          private bool _ConnectionIsOpen;
# Line 42  namespace AnywhereTS.DBSupport Line 48  namespace AnywhereTS.DBSupport
48              try              try
49              {              {
50                  string connetionString = null;                  string connetionString = null;
51                  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);
52                  connection = new DBConnection();                  connection = new DBConnection();
53                  connection.ConnectionString = connetionString;                  connection.ConnectionString = connetionString;
54              }              }

Legend:
Removed from v.84  
changed lines
  Added in v.85

  ViewVC Help
Powered by ViewVC 1.1.22