CDatabase::IsOpen
Call this member function to determine whether the CDatabase object is currently connected to a data source.
BOOL IsOpen( ) const;
Return Value
Nonzero if the CDatabase object is currently connected; otherwise 0.
Requirements
Header: afxdb.h