Data1Set.cpp
资源名称:基本GIS系统开发.rar [点击查看]
上传用户:yklx818
上传日期:2013-04-13
资源大小:459k
文件大小:2k
源码类别:
GIS编程
开发平台:
Visual C++
- // Data1Set.cpp : implementation of the CData1Set class
- //
- #include "stdafx.h"
- #include "Data1.h"
- #include "Data1Set.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CData1Set implementation
- IMPLEMENT_DYNAMIC(CData1Set, CRecordset)
- CData1Set::CData1Set(CDatabase* pdb)
- : CRecordset(pdb)
- {
- //{{AFX_FIELD_INIT(CData1Set)
- m_only_id = 0;
- m_city_name = _T("");
- m_population = 0;
- m_area = 0;
- m_industry = 0;
- m_translate = _T("");
- m_enviroment = _T("");
- m_nFields = 7;
- //}}AFX_FIELD_INIT
- m_nDefaultType = snapshot;
- }
- CString CData1Set::GetDefaultConnect()
- {
- return _T("ODBC;DSN=GISDATA");
- }
- CString CData1Set::GetDefaultSQL()
- {
- // return _T("select city_name,population from city where population>100");
- return _T("[city]");
- }
- void CData1Set::DoFieldExchange(CFieldExchange* pFX)
- {
- //{{AFX_FIELD_MAP(CData1Set)
- 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_Long(pFX, _T("[area]"), m_area);
- RFX_Long(pFX, _T("[industry]"), m_industry);
- RFX_Text(pFX, _T("[translate]"), m_translate);
- RFX_Text(pFX, _T("[enviroment]"), m_enviroment);
- //}}AFX_FIELD_MAP
- }
- /////////////////////////////////////////////////////////////////////////////
- // CData1Set diagnostics
- #ifdef _DEBUG
- void CData1Set::AssertValid() const
- {
- CRecordset::AssertValid();
- }
- void CData1Set::Dump(CDumpContext& dc) const
- {
- CRecordset::Dump(dc);
- }
- #endif //_DEBUG