createtable.cpp

来自「实现ADO连接SQL SERVER 2000数据库」· C++ 代码 · 共 59 行

CPP
59
字号
// CreateTable.cpp : implementation file
//

#include "stdafx.h"
#include "ADO.h"
#include "CreateTable.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CADOApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CCreateTable dialog


CCreateTable::CCreateTable(CWnd* pParent /*=NULL*/)
	: CDialog(CCreateTable::IDD, pParent)
{
	//{{AFX_DATA_INIT(CCreateTable)
	m_edit = _T("");
	//}}AFX_DATA_INIT
}


void CCreateTable::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCreateTable)
	DDX_Text(pDX, IDC_EDIT1, m_edit);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCreateTable, CDialog)
	//{{AFX_MSG_MAP(CCreateTable)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCreateTable message handlers

void CCreateTable::OnButton1() 
{
	// TODO: Add your control notification handler code here
	CString csInsert;
	csInsert.Format("Create Table ");
	theApp.m_pConnection->Execute((LPCTSTR)csInsert, NULL, adCmdText);	
}

void CCreateTable::OnButton2() 
{
	// TODO: Add your control notification handler code here
	OnCancel();
}

⌨️ 快捷键说明

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