Ado2Impl.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef __ADO2IMPL_20150822__
  2. #define __ADO2IMPL_20150822__
  3. #pragma once
  4. #include "AdoDef.h"
  5. #include "ADODatabase.h"
  6. #include "ADORecordset.h"
  7. #include "ADOCommand.h"
  8. #include "ADOBaseImpl.h"
  9. #include "CatalogInterface.h"
  10. #include "tblst.h"
  11. class Ado2Impl :public Catalogkernel::CatalogInterface
  12. {
  13. BOOL m_bOpen;
  14. CRITICAL_SECTION m_csAdo;
  15. CADODatabase *m_pADODatabase;
  16. TCHAR m_szConnectString[1024];
  17. public:
  18. Ado2Impl(void);
  19. ~Ado2Impl(void);
  20. public:
  21. // 打开数据库;
  22. BOOL OpenCatalog(IN Catalogkernel::STDatabaseInfo& dbInfo) ;
  23. // 关闭数据库;
  24. void CloseCatalog() ;
  25. // 执行SQL语句;
  26. INT Execute(IN LPCTSTR lpExcSQL);
  27. // 返回表记录大小;
  28. INT GetTblRecordCount(IN LPCTSTR lpTblName, IN LPCTSTR lpFilters);
  29. // 获取数据库连接状态;
  30. BOOL IsOpen() ;
  31. public:
  32. BOOL GetADODateBaseStatus();
  33. BOOL OpenADORecordSet(IN CADORecordset *pRSet, IN LPCTSTR lpSQL);
  34. void CloseADORecordSet(IN CADORecordset* pRSet);
  35. void DeleteADORecordSet(IN CADORecordset* pRSet);
  36. INT GetTbl_NetShareInfoRecordSet(IN CONST TCHAR *pTableName, IN CONST TCHAR *pFilters, IN CONST TCHAR *pSql, INT &nFieldCount, OUT vector<TblNetShareInfo>& vtRSet);
  37. INT GetTbl_dindanRecordSet(IN CONST TCHAR *pTableName, IN CONST TCHAR *pFilters, IN CONST TCHAR *pSql, INT &nFieldCount, OUT vector<Tbldindan>& vtRSet);
  38. };
  39. #endif