1234567891011121314151617181920212223242526272829 |
- #ifndef __DATABASEOPT_H__
- #define __DATABASEOPT_H__
- #include <vector>
- #include <afxdb.h>
- #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<CStringArray,CStringArray>& AryOfValues, IN LPCTSTR lpTabName, IN std::vector<CString>& 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
|