myrecordset.cpp
上传用户:yhxbjx
上传日期:2018-11-07
资源大小:7142k
文件大小:1k
- // myrecordset.cpp : implementation file
- //
- #include "stdafx.h"
- #include "sheji2.h"
- #include "myrecordset.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // myrecordset
- IMPLEMENT_DYNAMIC(myrecordset, CRecordset)
- myrecordset::myrecordset(CDatabase* pdb)
- : CRecordset(pdb)
- {
- //{{AFX_FIELD_INIT(myrecordset)
- m_ID = _T("");
- m_name = _T("");
- m_workplace = _T("");
- m_address = _T("");
- m_fixphone = _T("");
- m_phone = _T("");
- m_nFields = 6;
- //}}AFX_FIELD_INIT
- m_nDefaultType = snapshot;
- }
- CString myrecordset::GetDefaultConnect()
- {
- return _T("ODBC;DSN=water");
- }
- CString myrecordset::GetDefaultSQL()
- {
- return _T("[enter]");
- }
- void myrecordset::DoFieldExchange(CFieldExchange* pFX)
- {
- //{{AFX_FIELD_MAP(myrecordset)
- pFX->SetFieldType(CFieldExchange::outputColumn);
- RFX_Text(pFX, _T("[ID]"), m_ID);
- RFX_Text(pFX, _T("[name]"), m_name);
- RFX_Text(pFX, _T("[workplace]"), m_workplace);
- RFX_Text(pFX, _T("[address]"), m_address);
- RFX_Text(pFX, _T("[fixphone]"), m_fixphone);
- RFX_Text(pFX, _T("[phone]"), m_phone);
- //}}AFX_FIELD_MAP
- }
- /////////////////////////////////////////////////////////////////////////////
- // myrecordset diagnostics
- #ifdef _DEBUG
- void myrecordset::AssertValid() const
- {
- CRecordset::AssertValid();
- }
- void myrecordset::Dump(CDumpContext& dc) const
- {
- CRecordset::Dump(dc);
- }
- #endif //_DEBUG