📄 odbcsetup.cpp
字号:
// ODBCSETUP.cpp : implementation file
//
#include "stdafx.h"
#include "SMESWHY.h"
#include "ODBCSETUP.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// ODBCSETUP dialog
ODBCSETUP::ODBCSETUP(CWnd* pParent /*=NULL*/)
: CDialog(ODBCSETUP::IDD, pParent)
{
//{{AFX_DATA_INIT(ODBCSETUP)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void ODBCSETUP::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(ODBCSETUP)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(ODBCSETUP, CDialog)
//{{AFX_MSG_MAP(ODBCSETUP)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// ODBCSETUP message handlers
void ODBCSETUP::OnOK()
{
// TODO: Add extra validation here
SQLConfigDataSource(NULL,ODBC_ADD_SYS_DSN,"Microsoft Access Driver (*.mdb)\0","DSN=student\0DBQ=D:\\SMESWHY\\studentdd.mdb\0DEFAULTDIR=D:\\DATABASE\0\0");
//setup odbc datasource here
MessageBox("您已经成功设置数据源,确认退出吗?","数据源配置",MB_OK);
CDialog::OnOK();
}
void ODBCSETUP::OnCancel()
{
// TODO: Add extra cleanup here
MessageBox("您还没有设置数据源,确认退出吗?","数据源配置",MB_OK);
CDialog::OnCancel();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -