123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- // BranchInfo.h : CBranchInfo 类的实现
- // CBranchInfo 实现
- // 代码生成在 2015年4月9日, 18:47
- #include "stdafx.h"
- #include "BranchInfo.h"
- IMPLEMENT_DYNAMIC(CBranchInfo, CRecordset)
- CBranchInfo::CBranchInfo(CDatabase* pdb): CRecordset(pdb)
- {
- m_id = 0;
- m_branch = _T("");
- m_domain = _T("");
- m_publicIP = _T("");
- m_nFields = 4;
- m_nDefaultType = dynaset;
- }
- // 此连接字符串中可能包含明文密码和/或其他重要
- // 信息。请在查看完此连接字符串并找到所有与安全
- // 有关的问题后移除 #error。可能需要将此密码存
- // 储为其他格式或使用其他的用户身份验证。
- CString CBranchInfo::GetDefaultConnect()
- {
- return _T("ODBC;DSN");
- }
- CString CBranchInfo::GetDefaultSQL()
- {
- return _T("[dbo].[BranchInfo]");
- }
- void CBranchInfo::DoFieldExchange(CFieldExchange* pFX)
- {
- pFX->SetFieldType(CFieldExchange::outputColumn);
- // RFX_Text() 和 RFX_Int() 这类宏依赖的是
- // 成员变量的类型,而不是数据库字段的类型。
- // ODBC 尝试自动将列值转换为所请求的类型
- RFX_Long(pFX, _T("[id]"), m_id);
- RFX_Text(pFX, _T("[branch]"), m_branch);
- RFX_Text(pFX, _T("[domain]"), m_domain);
- RFX_Text(pFX, _T("[publicIP]"), m_publicIP);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CBranchInfo 诊断
- #ifdef _DEBUG
- void CBranchInfo::AssertValid() const
- {
- CRecordset::AssertValid();
- }
- void CBranchInfo::Dump(CDumpContext& dc) const
- {
- CRecordset::Dump(dc);
- }
- #endif //_DEBUG
|