--- h6-udlånssystemDlg.cpp 2006/08/30 21:57:57 9 +++ h6-udlånssystemDlg.cpp 2006/09/01 02:42:38 23 @@ -107,8 +107,15 @@ m_tabs.SetCurSel(0); - DatabaseLayer *dbl = new DatabaseLayer; - CommonStorage::Instance()->setDBLayer(dbl); + try { + DatabaseLayer *dbl = new DatabaseLayer; + CommonStorage::Instance()->setDBLayer(dbl); + } catch (...) { + MessageBox(CString("Could not establish connection to the database server\r\n") + + "Please contact your network administrator\r\n" + + "(This application shuts down automatically)"); + OnOK(); + } // TODO: Add extra initialization here