Data2Set.cpp
上传用户:y440e3
上传日期:2010-03-08
资源大小:200k
文件大小:1k
- // Data2Set.cpp : implementation file
- //
- #include "stdafx.h"
- #include "draw.h"
- #include "Data2Set.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CData2Set
- IMPLEMENT_DYNAMIC(CData2Set, CRecordset)
- CData2Set::CData2Set(CDatabase* pdb)
- : CDataBaseSet(pdb)
- {
- //{{AFX_FIELD_INIT(CData2Set)
- m_database_id = 0;
- m_record_id = 0;
- m_graph_id = 0;
- m_element_id = 0;
- m_nFields = 4;
- //}}AFX_FIELD_INIT
- m_nDefaultType = snapshot;
- }
- CString CData2Set::GetDefaultConnect()
- {
- return _T("ODBC;DSN=GISBOOK");
- }
- CString CData2Set::GetDefaultSQL()
- {
- return _T("[dbo].[LinkInfo]");
- }
- void CData2Set::DoFieldExchange(CFieldExchange* pFX)
- {
- //{{AFX_FIELD_MAP(CData2Set)
- pFX->SetFieldType(CFieldExchange::outputColumn);
- RFX_Int(pFX, _T("[database_id]"), m_database_id);
- RFX_Long(pFX, _T("[record_id]"), m_record_id);
- RFX_Int(pFX, _T("[graph_id]"), m_graph_id);
- RFX_Long(pFX, _T("[element_id]"), m_element_id);
- //}}AFX_FIELD_MAP
- }
- int CData2Set::GetID()
- {
- return 1;
- }
- /////////////////////////////////////////////////////////////////////////////
- // CData2Set diagnostics
- #ifdef _DEBUG
- void CData2Set::AssertValid() const
- {
- CRecordset::AssertValid();
- }
- void CData2Set::Dump(CDumpContext& dc) const
- {
- CRecordset::Dump(dc);
- }
- #endif //_DEBUG