home *** CD-ROM | disk | FTP | other *** search
- // MyRecordset2.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "odbc2.h"
- #include "MyRecordset2.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CMyRecordset2
-
- IMPLEMENT_DYNAMIC(CMyRecordset2, CRecordset)
-
- CMyRecordset2::CMyRecordset2(CDatabase* pdb)
- : CRecordset(pdb)
- {
- //{{AFX_FIELD_INIT(CMyRecordset2)
- m_major = 0;
- m_minor = 0;
- m_width = 0;
- m_priority = 0;
- m_RGBColor = _T("");
- m_threshold = 0;
- m_style = _T("");
- m_hatch = _T("");
- m_colorref = 0;
- m_description = _T("");
- m_pDescription = NULL;
- m_nFields = 11;
- //}}AFX_FIELD_INIT
- m_nDefaultType = snapshot;
- }
-
-
- CString CMyRecordset2::GetDefaultConnect()
- {
- return _T("ODBC;DSN=Rowset");
- }
-
- CString CMyRecordset2::GetDefaultSQL()
- {
- return _T("[attributes]");
- }
-
- void CMyRecordset2::DoFieldExchange(CFieldExchange* pFX)
- {
- //{{AFX_FIELD_MAP(CMyRecordset2)
- pFX->SetFieldType(CFieldExchange::outputColumn);
- RFX_Int(pFX, _T("[major]"), m_major);
- RFX_Int(pFX, _T("[minor]"), m_minor);
- RFX_Int(pFX, _T("[width]"), m_width);
- RFX_Int(pFX, _T("[priority]"), m_priority);
- RFX_Text(pFX, _T("[RGBColor]"), m_RGBColor);
- RFX_Long(pFX, _T("[threshold]"), m_threshold);
- RFX_Text(pFX, _T("[style]"), m_style);
- RFX_Text(pFX, _T("[hatch]"), m_hatch);
- RFX_Long(pFX, _T("[colorref]"), m_colorref);
- RFX_Text(pFX, _T("[description]"), m_description);
-
- //}}AFX_FIELD_MAP
- }
- void CMyRecordset2::DoBulkFieldExchange(CFieldExchange * pFX)
- {
- pFX->SetFieldType(CFieldExchange::outputColumn);
- RFX_Text_Bulk(pFX, _T("[description]"), NULL, NULL, NULL);
-
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CMyRecordset2 diagnostics
-
- #ifdef _DEBUG
- void CMyRecordset2::AssertValid() const
- {
- CRecordset::AssertValid();
- }
-
- void CMyRecordset2::Dump(CDumpContext& dc) const
- {
- CRecordset::Dump(dc);
- }
- #endif //_DEBUG
-
-