MajorSet.cpp
资源名称:school.rar [点击查看]
上传用户:rs600066
上传日期:2017-10-16
资源大小:4788k
文件大小:1k
源码类别:
数据库系统
开发平台:
Visual C++
- // MajorSet.cpp : implementation file
- //
- #include "stdafx.h"
- #include "school.h"
- #include "MajorSet.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CMajorSet
- IMPLEMENT_DYNAMIC(CMajorSet, CRecordset)
- CMajorSet::CMajorSet(CDatabase* pdb)
- : CRecordset(pdb)
- {
- //{{AFX_FIELD_INIT(CMajorSet)
- m_code = _T("");
- m_name = _T("");
- m_department = _T("");
- m_brief = _T("");
- m_nFields = 4;
- //}}AFX_FIELD_INIT
- m_nDefaultType = snapshot;
- }
- CString CMajorSet::GetDefaultConnect()
- {
- return _T("ODBC;DSN=school");
- }
- CString CMajorSet::GetDefaultSQL()
- {
- return _T("[major]");
- }
- void CMajorSet::DoFieldExchange(CFieldExchange* pFX)
- {
- //{{AFX_FIELD_MAP(CMajorSet)
- pFX->SetFieldType(CFieldExchange::outputColumn);
- RFX_Text(pFX, _T("[code]"), m_code);
- RFX_Text(pFX, _T("[name]"), m_name);
- RFX_Text(pFX, _T("[department]"), m_department);
- RFX_Text(pFX, _T("[brief]"), m_brief);
- //}}AFX_FIELD_MAP
- }
- /////////////////////////////////////////////////////////////////////////////
- // CMajorSet diagnostics
- #ifdef _DEBUG
- void CMajorSet::AssertValid() const
- {
- CRecordset::AssertValid();
- }
- void CMajorSet::Dump(CDumpContext& dc) const
- {
- CRecordset::Dump(dc);
- }
- #endif //_DEBUG