/[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/12 12:21:43	39
+++ trunk/TSAdminTool/Database.cs	2012/07/12 12:25:58	40
@@ -143,13 +143,22 @@
                                     bContinue = RunScript(Resource1.UpdateDatabase3.ToString());
                                     Logging.ATSAdminLog.DebugFormat("Upgraded Database from version: {0} to version: {1}", "1.0.0.2", "1.0.0.3");
                                     break;
-                                }
-
-                            
+                                }                            
                             default:
                                 {
-                                    MessageBox.Show("Error: Not able to upgrade database (51188)");
-                                    Logging.ATSAdminLog.DebugFormat("Failed to upgrade Database from version: {0} to version: {1}", databaseVersion.ToString(), CURRENT_DB_VERSION.ToString());
+                                    //MessageBox.Show("Error: Not able to upgrade database (51188)");
+                                    if (databaseVersion == new Version(0, 0, 0, 0))
+                                    {
+                                        string format = string.Format("Database version is {0}, this should have been auto upgraded to {1}", databaseVersion.ToString(), CURRENT_DB_VERSION.ToString());
+                                        Logging.ATSAdminLog.Fatal(format);
+                                        MessageBox.Show(format);
+                                    }
+                                    else
+                                    {
+                                        string format = string.Format("Failed to upgrade Database from version: {0} to version: {1}", databaseVersion.ToString(), CURRENT_DB_VERSION.ToString());
+                                        Logging.ATSAdminLog.Fatal(format);
+                                        MessageBox.Show(format);
+                                    }                                    
                                     break;
                                 }
                         }

 

  ViewVC Help
Powered by ViewVC 1.1.22