#ifndef __DATABASEOPT_H__ #define __DATABASEOPT_H__ #include #include #include "Lock.h" class DataBaseOpt { public: DataBaseOpt(); ~DataBaseOpt(); int OpenDB(LPCTSTR lpConnect); void CloseDB(); BOOL IsOpenDB(); DWORD SelectCount(IN LPCTSTR lpTabName, IN LPCTSTR lpFilter = NULL); int Select(OUT CArray& AryOfValues, IN LPCTSTR lpTabName, IN std::vector& vFields, IN LPCTSTR lpFilter = NULL); int Execute(IN LPCTSTR lpSQL); private: BOOL m_bOpen; TCHAR m_szConnect[MAX_PATH]; CDatabase* m_pdb; CLock m_lock; }; #endif