www.pudn.com > RadiusSrv.rar > DBManager.h, change:2003-10-24,size:926b


#ifndef _DB_MANAGER_H 
#define _DB_MANAGER_H 
 
#include <string> 
#include <sstream> 
#include <ole2.h> 
 
using namespace std; 
 
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF") 
 
class DBManager 
{ 
public: 
	DBManager(); 
	~DBManager(); 
 
public: 
//	bool DBInit(_DB_INFO &dbMaster); 
	bool Open(const char *strConnection, const char *strUserID, const char *strPassword); 
	void Close(); 
	 
	void prepareStatement(const string &strPrepareStmt); 
 
	_RecordsetPtr executeQuery(void); 
	_RecordsetPtr executeQuery(string &strPreStmt); 
 
private: 
	_ConnectionPtr m_pConnection;//connection object's pointer  
	_CommandPtr  m_pCommand;	//command object's pointer 
	_ParameterPtr m_pParameter; //Parameter object's pointer 
	_RecordsetPtr m_pRecordset;   
	 
	string m_strPrepareStmt;           //查询或者执行所用的语句 
	 
	_variant_t  m_RecordsAffected; 
 
}; 
 
#endif