/[AnywhereTS-MSSQL]/trunk/TSAdminTool/Database.cs
ViewVC logotype

Diff of /trunk/TSAdminTool/Database.cs

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

revision 122 by william, Sat Jul 14 09:40:33 2012 UTC revision 123 by william, Sat Jul 14 11:14:09 2012 UTC
# Line 222  namespace AnywhereTS Line 222  namespace AnywhereTS
222          public bool RunScript(string strFile, MsSqlConnector con, out Exception ErrorInfo)          public bool RunScript(string strFile, MsSqlConnector con, out Exception ErrorInfo)
223          {          {
224              ErrorInfo = null;              ErrorInfo = null;
225              string cmd = strFile.Replace("[DataDir]", ProSupport.strDatabasePath);              string cmd = strFile;
226                //cmd = cmd.Replace("[DataDir]", ProSupport.strDatabasePath);
227              con.RunScript(cmd, out ErrorInfo);              con.RunScript(cmd, out ErrorInfo);
228              return false;              return false;
229          }          }
# Line 469  namespace AnywhereTS Line 470  namespace AnywhereTS
470                
471    
472    
473          [Obsolete("SetDatabaseRights() has been deperecated - user rights are assigned via SQL Server")]          //[Obsolete("SetDatabaseRights() has been deperecated - user rights are assigned via SQL Server", true)]
474          public static void SetDatabaseRights()          //public static void SetDatabaseRights()
475          {          //{
476              try          //    try
477              {          //    {
478                  // Add an access control entry to the database file.          //        // Add an access control entry to the database file.
479                  ProSupport.GrantRWaccessForRemoteDesktopUsers(ProSupport.strDatabasePath + @"\" + ProSupport.strDatabaseFilename);          //        //ProSupport.GrantRWaccessForRemoteDesktopUsers(ProSupport.strDatabasePath + @"\" + ProSupport.strDatabaseFilename);
480                  ProSupport.GrantRWaccessForRemoteDesktopUsers(ProSupport.strDatabasePath + @"\" + ProSupport.strDatabaseFilename2);          //        //ProSupport.GrantRWaccessForRemoteDesktopUsers(ProSupport.strDatabasePath + @"\" + ProSupport.strDatabaseFilename2);
481              }          //    }
482              catch (Exception e)          //    catch (Exception e)
483              {          //    {
484                  MessageBox.Show("Cannot set access rights for users to the database. Do you have the sufficient rights? Application will abort. Error: " + e.Message);          //        MessageBox.Show("Cannot set access rights for users to the database. Do you have the sufficient rights? Application will abort. Error: " + e.Message);
485                  using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", e.Message, System.Environment.NewLine, e.ToString())))          //        using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", e.Message, System.Environment.NewLine, e.ToString())))
486                  {          //        {
487                      Logging.ATSAdminLog.Fatal("Cannot set access rights for users to the database.");          //            Logging.ATSAdminLog.Fatal("Cannot set access rights for users to the database.");
488                  }          //        }
489                  Application.Exit();          //        Application.Exit();
490                  return;          //        return;
491              }          //    }
492          }          //}
493    
494          public static void StartSQLbrowserService()          public static void StartSQLbrowserService()
495          {          {

Legend:
Removed from v.122  
changed lines
  Added in v.123

  ViewVC Help
Powered by ViewVC 1.1.22