Data1Ret.cpp
上传用户:y440e3
上传日期:2010-03-08
资源大小:200k
文件大小:2k
- // Data1Set.cpp : implementation file
- //
- #include "stdafx.h"
- #include "draw.h"
- #include "Data1Ret.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // Data1Set
- IMPLEMENT_DYNAMIC(Data1Set, CRecordset)
- Data1Set::Data1Set(CDatabase* pdb)
- : CDataBaseSet(pdb)
- {
- //{{AFX_FIELD_INIT(Data1Set)
- m_only_id = 0;
- m_city_name = _T("");
- m_population = 0;
- m_area = 0.0;
- m_industry = 0.0;
- m_translate = _T("");
- m_nFields = 6;
- //}}AFX_FIELD_INIT
- m_nDefaultType = snapshot;
- }
- CString Data1Set::GetDefaultConnect()
- {
- return _T("ODBC;DSN=GISBOOK");
- }
- CString Data1Set::GetDefaultSQL()
- {
- return _T("[dbo].[city]");
- }
- void Data1Set::DoFieldExchange(CFieldExchange* pFX)
- {
- //{{AFX_FIELD_MAP(Data1Set)
- pFX->SetFieldType(CFieldExchange::outputColumn);
- RFX_Long(pFX, _T("[only_id]"), m_only_id);
- RFX_Text(pFX, _T("[city_name]"), m_city_name);
- RFX_Long(pFX, _T("[population]"), m_population);
- RFX_Double(pFX, _T("[area]"), m_area);
- RFX_Double(pFX, _T("[industry]"), m_industry);
- RFX_Text(pFX, _T("[translate]"), m_translate);
- //}}AFX_FIELD_MAP
- }
- /////////////////////////////////////////////////////////////////////////////
- // Data1Set diagnostics
- #ifdef _DEBUG
- void Data1Set::AssertValid() const
- {
- CRecordset::AssertValid();
- }
- void Data1Set::Dump(CDumpContext& dc) const
- {
- CRecordset::Dump(dc);
- }
- #endif //_DEBUG
- int Data1Set::GetID()
- {
- return m_only_id;
- }