#ifndef __ADO2IMPL_20150822__ #define __ADO2IMPL_20150822__ #pragma once #include "AdoDef.h" #include "ADODatabase.h" #include "ADORecordset.h" #include "ADOCommand.h" #include "ADOBaseImpl.h" #include "CatalogInterface.h" #include "tblst.h" class Ado2Impl :public Catalogkernel::CatalogInterface { BOOL m_bOpen; CRITICAL_SECTION m_csAdo; CADODatabase *m_pADODatabase; TCHAR m_szConnectString[1024]; public: Ado2Impl(void); ~Ado2Impl(void); public: // 打开数据库; BOOL OpenCatalog(IN Catalogkernel::STDatabaseInfo& dbInfo) ; // 关闭数据库; void CloseCatalog() ; // 执行SQL语句; INT Execute(IN LPCTSTR lpExcSQL); // 返回表记录大小; INT GetTblRecordCount(IN LPCTSTR lpTblName, IN LPCTSTR lpFilters); // 获取数据库连接状态; BOOL IsOpen() ; public: BOOL GetADODateBaseStatus(); BOOL OpenADORecordSet(IN CADORecordset *pRSet, IN LPCTSTR lpSQL); void CloseADORecordSet(IN CADORecordset* pRSet); void DeleteADORecordSet(IN CADORecordset* pRSet); INT GetTbl_NetShareInfoRecordSet(IN CONST TCHAR *pTableName, IN CONST TCHAR *pFilters, IN CONST TCHAR *pSql, INT &nFieldCount, OUT vector& vtRSet); INT GetTbl_dindanRecordSet(IN CONST TCHAR *pTableName, IN CONST TCHAR *pFilters, IN CONST TCHAR *pSql, INT &nFieldCount, OUT vector& vtRSet); }; #endif