⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 odbcsqlview.h

📁 经典C++书籍钱能C++书籍例子代码实例
💻 H
字号:
// odbcsqlView.h : interface of the COdbcsqlView class
//
/////////////////////////////////////////////////////////////////////////////


#if !defined(AFX_ODBCSQLVIEW_H__F14C59CD_2DF1_11D7_829B_95C673B89847__INCLUDED_)
#define AFX_ODBCSQLVIEW_H__F14C59CD_2DF1_11D7_829B_95C673B89847__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <afxdb.h>	 //数据库支持所需头文件
#include "ODBCINST.H"	 //SQLConfigDataSource()函数所在的头文件
#include "MCIClass.h"
#include "mmsystem.h"

class COdbcsqlView : public CFormView,CMCIClass
{
protected: // create from serialization only
	COdbcsqlView();
	DECLARE_DYNCREATE(COdbcsqlView)
	short m_NKey;
	CString m_Key;
	CRecordset * m_set;
	int m_CurSel;

public:
	//{{AFX_DATA(COdbcsqlView)
	enum { IDD = IDD_ODBCSQL_FORM };
	UINT	m_id;
	CString	m_name;
	CString	m_position;
	CString	m_singer;
	CString	m_writer;
	CString	m_sql;
	CString	m_item1;
	CString	m_item2;
	CString	m_item3;
	CString	m_item4;
	CString	m_item5;
	//}}AFX_DATA

// Attributes
public:
	COdbcsqlDoc* GetDocument();

// Operations
public:
 	CString m_Query;
//	CSQLDlg m_SQLDlg;
	BOOL m_DSOK;
    CDatabase m_Db;
	void ReadDisplayFields(void);
	void ReadDispalyRecord(void);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(COdbcsqlView)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~COdbcsqlView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(COdbcsqlView)
	afx_msg void OnRecordFirst();
	afx_msg void OnRecordLast();
	afx_msg void OnRecordNext();
	afx_msg void OnRecordPrev();
	afx_msg void OnSqlOk();
	afx_msg void OnDestroy();
	afx_msg void OnRecordPlay();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in odbcsqlView.cpp
inline COdbcsqlDoc* COdbcsqlView::GetDocument()
   { return (COdbcsqlDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_ODBCSQLVIEW_H__F14C59CD_2DF1_11D7_829B_95C673B89847__INCLUDED_)

⌨️ 快捷键说明

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