/[AnywhereTS-MSSQL]/trunk/AnywhereTS.DBSupport/MSSQLConnector.cs
ViewVC logotype

Diff of /trunk/AnywhereTS.DBSupport/MSSQLConnector.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 85 by william, Fri Jul 13 21:10:26 2012 UTC revision 119 by william, Sat Jul 14 09:08:55 2012 UTC
# Line 8  namespace AnywhereTS.DBSupport Line 8  namespace AnywhereTS.DBSupport
8      public class MsSqlConnector : DBConnector<SqlParameter,SqlCommand,SqlConnection,SqlDataAdapter>      public class MsSqlConnector : DBConnector<SqlParameter,SqlCommand,SqlConnection,SqlDataAdapter>
9      {      {
10          public MsSqlConnector(string DBServerAddress, string DBServerInstance, string DBDatabase) : base(DBServerAddress, DBServerInstance, DBDatabase) { }          public MsSqlConnector(string DBServerAddress, string DBServerInstance, string DBDatabase) : base(DBServerAddress, DBServerInstance, DBDatabase) { }
11    
12            public override bool ClientRunScript(string[] strCommands, out Exception ErrorInfo)
13            {
14                ErrorInfo = null;
15                try
16                {
17                    foreach (string strCmd in strCommands)
18                    {
19                        if (strCmd.Length > 0)
20                        {
21                            Logging.DatabaseLog.DebugFormat("Current Command: {0}{1}",System.Environment.NewLine, strCmd);
22                            // Substitute database directory with the decided one.
23                            SqlCommand command = this.CreateCommandInstance(strCmd, new List<SqlParameter>(), out ErrorInfo);
24                            command.ExecuteNonQuery();
25                        }
26                    }
27                    return true;
28                }
29                catch (Exception ex)
30                {
31                    ErrorInfo = ex;
32                    return false;
33                }
34            }
35      }      }
36  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.22