rststudenttype.cpp

来自「一个驾校学员的数据库管理软件。采用ACCESS数据库。非常方便。」· C++ 代码 · 共 67 行

CPP
67
字号
// RstStudentType.cpp : implementation file
//

#include "stdafx.h"
#include "AutoStuMis.h"
#include "RstStudentType.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CRstStudentType

IMPLEMENT_DYNAMIC(CRstStudentType, CRecordset)

CRstStudentType::CRstStudentType(CDatabase* pdb)
	: CRecordset(pdb)
{
	//{{AFX_FIELD_INIT(CRstStudentType)
	m_F_ID = 0;
	m_F_ItemName = _T("");
	m_nFields = 2;
	//}}AFX_FIELD_INIT
	m_nDefaultType = snapshot;
	CAutoStuMisApp *pApp=(CAutoStuMisApp*)AfxGetApp();
	this->m_pDatabase = &pApp->m_db; 
	m_nDefaultType = pApp->m_nOpenType;
}


CString CRstStudentType::GetDefaultConnect()
{
	return _T("ODBC;DSN=Auto");
}

CString CRstStudentType::GetDefaultSQL()
{
	return _T("[T_iStudentType]");
}

void CRstStudentType::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(CRstStudentType)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Long(pFX, _T("[F_ID]"), m_F_ID);
	RFX_Text(pFX, _T("[F_ItemName]"), m_F_ItemName);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CRstStudentType diagnostics

#ifdef _DEBUG
void CRstStudentType::AssertValid() const
{
	CRecordset::AssertValid();
}

void CRstStudentType::Dump(CDumpContext& dc) const
{
	CRecordset::Dump(dc);
}
#endif //_DEBUG

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?