DWORD CDbInterfaceBo::BeginOfDay(void) { DWORD dwResult = S_OK ; _bstr_t sUsp(_T("usp_DatabaseCleanUp")); try { EgLib::CStoredProc<> spCleanUp(m_Connection, sUsp); spCleanUp.Execute () ; } catch (const _com_error& re) { //OMLIB_TRACE_EX(re.Error(), ERROR_OM_DB_STOREDPROC, (LPCTSTR)sUsp, re.Description().length()?(LPCTSTR)re.Description():re.ErrorMessage()); //AfxMessageBox(_T("Error checking DB Version."), MB_ICONERROR); dwResult = re.Error(); } return dwResult; }
static void spFatal(std::string err_msg) { sp_error = "FATAL ERROR: " + err_msg; sp_log << sp_error << std::endl; spCleanUp(); }