loginset.cpp

来自「采用MFC+SQLSERVER 2000的图书管理系统,ODBC方式连接数据库。」· C++ 代码 · 共 66 行

CPP
66
字号
// LoginSet.cpp : implementation file
//登录查询记录类

#include "stdafx.h"
#include "library.h"
#include "LoginSet.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CLoginSet

IMPLEMENT_DYNAMIC(CLoginSet, CRecordset)

CLoginSet::CLoginSet(CDatabase* pdb)
	: CRecordset(pdb)
{
	//{{AFX_FIELD_INIT(CLoginSet)
	m_Mid = 0;
	m_Mname = _T("");
	m_Mpassword = _T("");
	m_nFields = 3;
	//}}AFX_FIELD_INIT
	m_nDefaultType = snapshot;
}


CString CLoginSet::GetDefaultConnect()
{
	return _T("ODBC;DSN=MySQL");
}

CString CLoginSet::GetDefaultSQL()
{
	return _T("[dbo].[MANGEINFORM]");
}

void CLoginSet::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(CLoginSet)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Long(pFX, _T("[Mid]"), m_Mid);
	RFX_Text(pFX, _T("[Mname]"), m_Mname);
	RFX_Text(pFX, _T("[Mpassword]"), m_Mpassword);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CLoginSet diagnostics

#ifdef _DEBUG
void CLoginSet::AssertValid() const
{
	CRecordset::AssertValid();
}

void CLoginSet::Dump(CDumpContext& dc) const
{
	CRecordset::Dump(dc);
}
#endif //_DEBUG

⌨️ 快捷键说明

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