newntui/discovermdi/src/simplifyselection.cpp
//------------------------------------------------------------------------------------------
// This function check communications status after access datasource.
//------------------------------------------------------------------------------------------
This function check communications status after access datasource.
This function check communications status after access datasource .
CString CSimplifySelection::DataSourceAccessSync(BSTR* command) {
	CString res;
	static BOOL bCommDlgShown = FALSE;
	res = m_DataSource.AccessSync(command);
	if (m_DataSource.IsConnectionLost() == TRUE &&
		bCommDlgShown != TRUE ) {
		::MessageBox(m_hWnd, 
			   _T("Connection with server is lost."
			   " Make sure the server is running."),
			   _T("Server Communication Error."), 
			   MB_OK | MB_ICONINFORMATION); 
		bCommDlgShown = TRUE;
	} else if (m_DataSource.IsConnectionLost() != TRUE) {
		bCommDlgShown = FALSE;
	}	
	return res;
}
CString CSimplifySelection :: DataSourceAccessSync ( BSTR * command ) { CString res ; static BOOL bCommDlgShown = FALSE ; res = m_DataSource . AccessSync ( command ) ; if ( m_DataSource . IsConnectionLost ( ) == TRUE && bCommDlgShown != TRUE ) { :: MessageBox ( m_hWnd , _T ( " " " " ) , _T ( " " ) , MB_OK | MB_ICONINFORMATION ) ; bCommDlgShown = TRUE ; } else if ( m_DataSource . IsConnectionLost ( ) != TRUE ) { bCommDlgShown = FALSE ; } return res ; }
This function check communications status after access datasource.
This function check communications status after access datasource .