www.pudn.com > ExMIS.rar > MyRecordSet.h, change:2007-05-12,size:1289b


// MyRecordSet.h: interface for the MyRecordSet class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_MYRECORDSET_H__E50043C5_60AA_4B77_A6B2_5EA15F204419__INCLUDED_) 
#define AFX_MYRECORDSET_H__E50043C5_60AA_4B77_A6B2_5EA15F204419__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
class MyRecordSet   
{ 
public: 
	//数据集的列数 
	int nFieldCols; 
	//数据集的行数 
	int nFieldRows; 
	//存放用户权限 
	int	nPower;	 
 
	float GetFieldFloat(int nCol); 
	int GetFieldNumber(int nCol); 
	CString GetFieldString(int nCol); 
 
	HRESULT MoveNext(); 
	HRESULT MovePrev(); 
	HRESULT MoveLast(); 
	HRESULT MoveFirst(); 
	MyRecordSet(); 
 
	bool ADOOpen(CString m_strDataType); 
	bool ADOExcute();				//执行SQL语句:带参数 
	bool ADOExcute(CString strSQL);	//执行SQL语句:不带参数 
	void ADOClose(); 
 
	_ConnectionPtr m_pConn;		//定义一个连接对象 
	_RecordsetPtr m_pRst;		//定义一个数据集 
 
	CString		m_strSQL;				//查询语句 
	bool		isConn;					//保存是否已经打开连接; 
 
	//bool ADOInitial(CString m_strDataType); 
 
	//MyRecordSet(); 
	MyRecordSet(CString m_strDataType); 
	virtual ~MyRecordSet(); 
 
private: 
	//连接字符串 
}; 
 
#endif // !defined(AFX_MYRECORDSET_H__E50043C5_60AA_4B77_A6B2_5EA15F204419__INCLUDED_)