recordset.h

来自「比较简陋的数据库应用,唯一能看的就是对ODBC的封装...」· C头文件 代码 · 共 53 行

H
53
字号
#ifndef _RECORDSET_H
#define _RECORDSET_H

#include <windows.h>
#include <odbcinst.h>
#include <sql.h>   
#include <sqlext.h>   
#include <sqltypes.h>

#include "Database.h"
#include "String.h"

class Recordset
{
public:
	Recordset(Database* pDB = NULL);
	virtual ~Recordset();

	bool Open(String strSQL);
	bool Open();
	void Close();

	bool IsOpen();
	
	bool Add();
	bool Delete();
	bool Edit();
//	virtual bool Update();

	bool Move(int RowNum);
	bool MoveNext();
	bool MovePrev();
	void SetParamNum(int num);

	String m_Where;
	String m_Order;
	int m_ParamNum;
	String *m_Param;
	String m_Table;
	int m_RowTotal;

private:
	Database* m_pDB;
	HSTMT m_stmt;
	bool isOpen;
	String m_Buffer;

//--------------------------------
	Recordset(const Recordset&);
	Recordset& operator=(const Recordset&);
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?