ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/AnywhereTS-MSSQL/trunk/TSAdminTool/Database.cs
(Generate patch)

Comparing trunk/TSAdminTool/Database.cs (file contents):
Revision 122 by william, Sat Jul 14 09:40:33 2012 UTC vs.
Revision 123 by william, Sat Jul 14 11:14:09 2012 UTC

# Line 222 | Line 222 | namespace AnywhereTS
222          public bool RunScript(string strFile, MsSqlConnector con, out Exception ErrorInfo)
223          {
224              ErrorInfo = null;
225 <            string cmd = strFile.Replace("[DataDir]", ProSupport.strDatabasePath);
225 >            string cmd = strFile;
226 >            //cmd = cmd.Replace("[DataDir]", ProSupport.strDatabasePath);
227              con.RunScript(cmd, out ErrorInfo);
228              return false;
229          }
# Line 469 | Line 470 | namespace AnywhereTS
470        
471  
472  
473 <        [Obsolete("SetDatabaseRights() has been deperecated - user rights are assigned via SQL Server")]
474 <        public static void SetDatabaseRights()
475 <        {
476 <            try
477 <            {
478 <                // Add an access control entry to the database file.
479 <                ProSupport.GrantRWaccessForRemoteDesktopUsers(ProSupport.strDatabasePath + @"\" + ProSupport.strDatabaseFilename);
480 <                ProSupport.GrantRWaccessForRemoteDesktopUsers(ProSupport.strDatabasePath + @"\" + ProSupport.strDatabaseFilename2);
481 <            }
482 <            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);
485 <                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.");
488 <                }
489 <                Application.Exit();
490 <                return;
491 <            }
492 <        }
473 >        //[Obsolete("SetDatabaseRights() has been deperecated - user rights are assigned via SQL Server", true)]
474 >        //public static void SetDatabaseRights()
475 >        //{
476 >        //    try
477 >        //    {
478 >        //        // Add an access control entry to the database file.
479 >        //        //ProSupport.GrantRWaccessForRemoteDesktopUsers(ProSupport.strDatabasePath + @"\" + ProSupport.strDatabaseFilename);
480 >        //        //ProSupport.GrantRWaccessForRemoteDesktopUsers(ProSupport.strDatabasePath + @"\" + ProSupport.strDatabaseFilename2);
481 >        //    }
482 >        //    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);
485 >        //        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.");
488 >        //        }
489 >        //        Application.Exit();
490 >        //        return;
491 >        //    }
492 >        //}
493  
494          public static void StartSQLbrowserService()
495          {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines