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

--- trunk/TSAdminTool/Database.cs	2012/07/14 11:09:02	122
+++ trunk/TSAdminTool/Database.cs	2012/07/14 11:14:09	123
@@ -222,7 +222,8 @@
         public bool RunScript(string strFile, MsSqlConnector con, out Exception ErrorInfo)
         {
             ErrorInfo = null;
-            string cmd = strFile.Replace("[DataDir]", ProSupport.strDatabasePath);
+            string cmd = strFile;
+            //cmd = cmd.Replace("[DataDir]", ProSupport.strDatabasePath);
             con.RunScript(cmd, out ErrorInfo);
             return false;
         }
@@ -469,26 +470,26 @@
       
 
 
-        [Obsolete("SetDatabaseRights() has been deperecated - user rights are assigned via SQL Server")]
-        public static void SetDatabaseRights()
-        {
-            try
-            {
-                // Add an access control entry to the database file.
-                ProSupport.GrantRWaccessForRemoteDesktopUsers(ProSupport.strDatabasePath + @"\" + ProSupport.strDatabaseFilename);
-                ProSupport.GrantRWaccessForRemoteDesktopUsers(ProSupport.strDatabasePath + @"\" + ProSupport.strDatabaseFilename2);
-            }
-            catch (Exception e)
-            {
-                MessageBox.Show("Cannot set access rights for users to the database. Do you have the sufficient rights? Application will abort. Error: " + e.Message);
-                using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", e.Message, System.Environment.NewLine, e.ToString())))
-                {
-                    Logging.ATSAdminLog.Fatal("Cannot set access rights for users to the database.");
-                }
-                Application.Exit();
-                return;
-            }
-        }
+        //[Obsolete("SetDatabaseRights() has been deperecated - user rights are assigned via SQL Server", true)]
+        //public static void SetDatabaseRights()
+        //{
+        //    try
+        //    {
+        //        // Add an access control entry to the database file.
+        //        //ProSupport.GrantRWaccessForRemoteDesktopUsers(ProSupport.strDatabasePath + @"\" + ProSupport.strDatabaseFilename);
+        //        //ProSupport.GrantRWaccessForRemoteDesktopUsers(ProSupport.strDatabasePath + @"\" + ProSupport.strDatabaseFilename2);
+        //    }
+        //    catch (Exception e)
+        //    {
+        //        MessageBox.Show("Cannot set access rights for users to the database. Do you have the sufficient rights? Application will abort. Error: " + e.Message);
+        //        using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", e.Message, System.Environment.NewLine, e.ToString())))
+        //        {
+        //            Logging.ATSAdminLog.Fatal("Cannot set access rights for users to the database.");
+        //        }
+        //        Application.Exit();
+        //        return;
+        //    }
+        //}
 
         public static void StartSQLbrowserService()
         {

 

  ViewVC Help
Powered by ViewVC 1.1.22