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 39 by william, Thu Jul 12 12:21:43 2012 UTC vs.
Revision 40 by william, Thu Jul 12 12:25:58 2012 UTC

--- 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 @@ namespace AnywhereTS
                                     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;
                                 }
                         }