--- h6-udlÃ¥nssystemDlg.cpp 2006/08/30 21:57:57 9 +++ h6-udlÃ¥nssystemDlg.cpp 2006/09/03 10:10:19 31 @@ -1,5 +1,7 @@ -// h6-udlånssystemDlg.cpp : implementation file -// +/* + * Developed by Torben H. Nielsen + */ + #include "stdafx.h" #include "h6-udlånssystem.h" @@ -76,6 +78,7 @@ BOOL Ch6udlnssystemDlg::OnInitDialog() { CDialog::OnInitDialog(); + CWaitCursor wait; // Add "About..." menu item to system menu. @@ -107,8 +110,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