📄 borrow.cpp
字号:
// borrow.h : Cborrow 类的实现
// Cborrow 实现
// 代码生成在 2008年3月21日, 15:29
#include "stdafx.h"
#include "borrow.h"
IMPLEMENT_DYNAMIC(Cborrow, CRecordset)
Cborrow::Cborrow(CDatabase* pdb)
: CRecordset(pdb)
{
m_cno = "";
m_bno = "";
m_borrow_date;
m_return_date;
m_nFields = 4;
m_nDefaultType = dynamic;
}
//#error Security Issue: The connection string may contain a password
// 此连接字符串中可能包含明文密码和/或其他重要
// 信息。请在查看完此连接字符串并找到所有与安全
// 有关的问题后移除 #error。可能需要将此密码存
// 储为其他格式或使用其他的用户身份验证。
CString Cborrow::GetDefaultConnect()
{
return _T("DSN=tspowen;Description=tspowen;APP=Microsoft\x00ae Visual Studio\x00ae 2005;WSID=TSPOWEN-01C4E20;DATABASE=Library;Trusted_Connection=Yes");
}
CString Cborrow::GetDefaultSQL()
{
return _T("[dbo].[borrow]");
}
void Cborrow::DoFieldExchange(CFieldExchange* pFX)
{
pFX->SetFieldType(CFieldExchange::outputColumn);
// RFX_Text() 和 RFX_Int() 这类宏依赖的是
// 成员变量的类型,而不是数据库字段的类型。
// ODBC 尝试自动将列值转换为所请求的类型
RFX_Text(pFX, _T("[cno]"), m_cno);
RFX_Text(pFX, _T("[bno]"), m_bno);
RFX_Date(pFX, _T("[borrow_date]"), m_borrow_date);
RFX_Date(pFX, _T("[return_date]"), m_return_date);
}
/////////////////////////////////////////////////////////////////////////////
// Cborrow 诊断
#ifdef _DEBUG
void Cborrow::AssertValid() const
{
CRecordset::AssertValid();
}
void Cborrow::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -