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

📄 libraryset.cpp

📁 一个图书管理程序 其中数据库部分需要自己设置 具体设置请参看源码
💻 CPP
字号:
// librarySet.cpp : ClibrarySet 类的实现
//

#include "stdafx.h"
#include "library.h"
#include "librarySet.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// ClibrarySet 实现

// 代码生成在 2008年3月21日, 13:09

IMPLEMENT_DYNAMIC(ClibrarySet, CRecordset)

ClibrarySet::ClibrarySet(CDatabase* pdb)
	: CRecordset(pdb)
{
	m_id = "";
	m_password = "";
	m_person_name = "";
	m_telephone = "";
	m_nFields = 4;
	m_nDefaultType = dynaset;
}

CString ClibrarySet::GetDefaultConnect()
{
	return _T("DSN=tspowen;Description=tspowen;APP=Microsoft\x00ae Visual Studio\x00ae 2005;WSID=TSPOWEN-01C4E20;DATABASE=Library;Trusted_Connection=Yes");
}

CString ClibrarySet::GetDefaultSQL()
{
	return _T("[dbo].[Administrator]");
}

void ClibrarySet::DoFieldExchange(CFieldExchange* pFX)
{
	pFX->SetFieldType(CFieldExchange::outputColumn);
// RFX_Text() 和 RFX_Int() 这类宏依赖的是
// 成员变量的类型,而不是数据库字段的类型。
// ODBC 尝试自动将列值转换为所请求的类型
	RFX_Text(pFX, _T("[ID]"), m_id);
	RFX_Text(pFX, _T("[password]"), m_password);
	RFX_Text(pFX, _T("[name]"), m_person_name);
	RFX_Text(pFX, _T("[phone]"), m_telephone);

}
/////////////////////////////////////////////////////////////////////////////
// ClibrarySet 诊断

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

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

⌨️ 快捷键说明

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