📄 reportset.cpp
字号:
// reportSet.cpp : CreportSet 类的实现
//
#include "stdafx.h"
#include "report.h"
#include "reportSet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CreportSet 实现
// 代码生成在 2004年3月10日, 22:07
IMPLEMENT_DYNAMIC(CreportSet, CRecordset)
CreportSet::CreportSet(CDatabase* pdb)
: CRecordset(pdb)
{
m_NO = 0;
m_Name = L"";
m_Literary = 0.0;
m_Math = 0.0;
m_Total = 0.0;
m_nFields = 5;
m_nDefaultType = dynaset;
}
//#error Security Issue: The connection string may contain a password
// 此连接字符串中可能包含密码
// 下面的连接字符串中可能包含明文密码和/或
// 其他重要信息。请在查看完
// 此连接字符串并找到所有与安全有关的问题后移除 #error。可能需要
// 将此密码存储为其他格式或使用其他的用户身份验证。
CString CreportSet::GetDefaultConnect()
{
return _T("DSN=test;DBQ=\ testdb.mdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;PWD=password;UID=admin;");
}
CString CreportSet::GetDefaultSQL()
{
return _T("[grade]");
}
void CreportSet::DoFieldExchange(CFieldExchange* pFX)
{
pFX->SetFieldType(CFieldExchange::outputColumn);
// RFX_Text() 和 RFX_Int() 这类宏依赖的是
// 成员变量的类型,而不是数据库字段的类型。
// ODBC 尝试自动将列值转换为所请求的类型
RFX_Long(pFX, _T("[NO]"), m_NO);
RFX_Text(pFX, _T("[Name]"), m_Name);
RFX_Single(pFX, _T("[Literary]"), m_Literary);
RFX_Single(pFX, _T("[Math]"), m_Math);
RFX_Single(pFX, _T("[Total]"), m_Total);
}
/////////////////////////////////////////////////////////////////////////////
// CreportSet 诊断
#ifdef _DEBUG
void CreportSet::AssertValid() const
{
CRecordset::AssertValid();
}
void CreportSet::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -