?? adoaccessdlg.h
字號(hào):
// ADOAccessDlg.h : header file
//
#if !defined(AFX_ADOACCESSDLG_H__85F7B481_4E5D_4BBC_9381_83689140488A__INCLUDED_)
#define AFX_ADOACCESSDLG_H__85F7B481_4E5D_4BBC_9381_83689140488A__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
namespace MSADOCE
{
#include <adoce30.h>
}
//定義連接對(duì)象唯一標(biāo)識(shí)
const IID IID__Connection = {0x113033DE,0xF682,0x11D2,{0xBB,0x62,0x00,0xC0,0x4F,0x68,0x0A,0xCC}};
//定義記錄對(duì)象唯一標(biāo)識(shí)
const IID IID__Recordset = {0x113033F6,0xF682,0x11D2,{0xBB,0x62,0x00,0xC0,0x4F,0x68,0x0A,0xCC}};
//定義連接對(duì)象字符串名
const TCHAR g_szADOCE30ConnProgID[]= TEXT("ADOCE.Connection.3.0");
//定義記錄對(duì)象字符串名
const TCHAR g_szADOCE30RSProgID[]= TEXT("ADOCE.Recordset.3.0");
class CADOAccessDlg : public CDialog
{
// Construction
public:
CADOAccessDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CADOAccessDlg)
enum { IDD = IDD_ADOACCESS_DIALOG };
CString m_strSql;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CADOAccessDlg)
public:
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CADOAccessDlg)
virtual BOOL OnInitDialog();
afx_msg void OnDestroy();
afx_msg void OnBtncreatedb();
afx_msg void OnBtnopendb();
afx_msg void OnBtnexec();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
MSADOCE::IADOCEConnection *m_pADOCEConn ; //連接對(duì)象
MSADOCE::IADOCERecordset *m_pADOCERS ; //記錄集對(duì)象
MSADOCE::IADOCEFields *m_pADOCEFields ; //字段集對(duì)象
MSADOCE::IADOCEField *m_pADOCEField ; //字段對(duì)象
private:
BOOL CreateConnection(); //建立與Access數(shù)據(jù)庫(kù)連接
void CloseConnection(); //關(guān)閉與Access數(shù)據(jù)庫(kù)連接
//打開(kāi)數(shù)據(jù)庫(kù)
BOOL OpenDatabase(LPCTSTR szDbName);
//新建數(shù)據(jù)庫(kù)
BOOL CreateDatabase(LPCTSTR szDbName);
//將表中的記錄在列表視圖上顯示
void AddRecordToView();
};
//{{AFX_INSERT_LOCATION}}
// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ADOACCESSDLG_H__85F7B481_4E5D_4BBC_9381_83689140488A__INCLUDED_)
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -