ADOConn.h
上传用户:xz12345
上传日期:2007-09-12
资源大小:7437k
文件大小:1k
- // ADOConn.h: interface for the ADOConn class.
- //
- //////////////////////////////////////////////////////////////////////
-
-
- #if !defined(AFX_ADOCONN_H__98C89482_CBCB_47A5_A533_7716D79C5A6E__INCLUDED_)
- #define AFX_ADOCONN_H__98C89482_CBCB_47A5_A533_7716D79C5A6E__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "StdAfx.h"
- #pragma warning(disable:4146)
- #import "C:Program FilesCommon FilesSystemadomsado15.dll" no_namespace rename("EOF","adoEOF")
- #pragma warning(default:4146)
- //#import "C:Program FilesCommon FilesSystemadomsado15.dll" no_namespace rename("EOF","adoEOF")
- class ADOConn
- {
- //定义变量
- public:
- _ConnectionPtr m_pConnection;//添加一个指向Connection对象的指针
- _RecordsetPtr m_pRecordset;
- //定义方法
- ADOConn();
- virtual ~ADOConn();
- void OnInitADOConn();//初始化连接数据库
- _RecordsetPtr& GetRecordSet(_bstr_t bstrSQL);//执行查询
- BOOL ExecuteSQL(_bstr_t bstrSQL);//执行SQL语句,Insert Update _variant_
- void ExitConnect();//断开连接
- };
- #endif // !defined(AFX_ADOCONN_H__98C89482_CBCB_47A5_A533_7716D79C5A6E__INCLUDED_)