/[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 131 by william, Sun Jul 15 02:55:20 2012 UTC revision 133 by william, Sun Jul 15 05:00:59 2012 UTC
# Line 10  namespace AnywhereTS.DBSupport Line 10  namespace AnywhereTS.DBSupport
10      {              {        
11          public SqlMdfConnector(string DBServerAddress, string DBServerInstance, string SqlMdf) : base(DBServerAddress, DBServerInstance, SqlMdf) { }          public SqlMdfConnector(string DBServerAddress, string DBServerInstance, string SqlMdf) : base(DBServerAddress, DBServerInstance, SqlMdf) { }
12    
13          public override SqlConnection CreateConnection(out Exception ErrorInfo)          public override void CreateConnection(out Exception ErrorInfo)
14          {          {
15              ErrorInfo = null;              ErrorInfo = null;
16              try              try
17              {              {
18                  string connetionString = null;                  string connetionString = GetConnectionString();
19                  connetionString = GetConnectionString();                  using (log4net.NDC.Push(string.Format("connetionString={0}", connetionString)))
20                  connection = new SqlConnection();                  {
21                  connection.ConnectionString = connetionString;                      Logging.DatabaseLog.Debug("Creating Connection");
22                  return connection;                      connection = new SqlConnection();
23                        connection.ConnectionString = connetionString;
24                        Logging.DatabaseLog.Debug("Created Connection");
25                    }
26              }              }
27              //catch (SqlException ex) { Console.WriteLine(ex.ToString()); ErrorInfo = ex;  throw ErrorInfo;}              //catch (SqlException ex) { Console.WriteLine(ex.ToString()); ErrorInfo = ex;  throw ErrorInfo;}
28              catch (Exception ex) { Console.WriteLine(ex.ToString()); ErrorInfo = ex; throw ErrorInfo; }              catch (Exception ex) { Console.WriteLine(ex.ToString()); ErrorInfo = ex; throw ErrorInfo; }

Legend:
Removed from v.131  
changed lines
  Added in v.133

  ViewVC Help
Powered by ViewVC 1.1.22