AdoInterface.h 517 B

12345678910111213141516171819202122232425262728
  1. #ifndef __ADOINTERFACE_H__
  2. #define __ADOINTERFACE_H__
  3. //************************************//
  4. // [类名]:CAdoInterface
  5. // [描述]:ado操作数据库
  6. //************************************//
  7. class CAdoInterface
  8. {
  9. public:
  10. CAdoInterface();
  11. ~CAdoInterface();
  12. HRESULT CreateInstance();
  13. HRESULT OpenDataBase(const TCHAR* pConnectStr, const TCHAR* pUserID, const TCHAR* pPWD, CString& errMsg);
  14. void CloseDataBase();
  15. _ConnectionPtr GetContPrt(){return m_pContPtr;}
  16. private:
  17. _ConnectionPtr m_pContPtr;
  18. };
  19. #endif