📄 crdbsdlg .cpp
字号:
// CRDBSDlg .h : Ccustomer 类的实现
// Ccustomer 实现
// 代码生成在 2005年1月15日, 14:24
#include "stdafx.h"
#include "CRDBSDlg .h"
IMPLEMENT_DYNAMIC(Ccustomer, CRecordset)
Ccustomer::Ccustomer(CDatabase* pdb)
: CRecordset(pdb)
{
column1 = 0;
m_Cname = L"";
m_Cnum = L"";
m_phone = L"";
m_address = L"";
m_nFields = 5;
m_nDefaultType = dynaset;
}
//#error Security Issue: The connection string may contain a password
// 此连接字符串中可能包含密码
// 下面的连接字符串中可能包含明文密码和/或
// 其他重要信息。请在查看完
// 此连接字符串并找到所有与安全有关的问题后移除 #error。可能需要
// 将此密码存储为其他格式或使用其他的用户身份验证。
CString Ccustomer::GetDefaultConnect()
{
return _T("DSN=a;DBQ=C:\\Documents and Settings\\Fly-snow\\My Documents\\c.mdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;");
}
CString Ccustomer::GetDefaultSQL()
{
return _T("[customer]");
}
void Ccustomer::DoFieldExchange(CFieldExchange* pFX)
{
pFX->SetFieldType(CFieldExchange::outputColumn);
// RFX_Text() 和 RFX_Int() 这类宏依赖的是
// 成员变量的类型,而不是数据库字段的类型。
// ODBC 尝试自动将列值转换为所请求的类型
RFX_Long(pFX, _T("[编号]"), column1);
RFX_Text(pFX, _T("[Cname]"), m_Cname);
RFX_Text(pFX, _T("[Cnum]"), m_Cnum);
RFX_Text(pFX, _T("[phone]"), m_phone);
RFX_Text(pFX, _T("[address]"), m_address);
}
/////////////////////////////////////////////////////////////////////////////
// Ccustomer 诊断
#ifdef _DEBUG
void Ccustomer::AssertValid() const
{
CRecordset::AssertValid();
}
void Ccustomer::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -