ODBCDepartmentSet.cpp
上传用户:benben_wyd
上传日期:2010-02-26
资源大小:1229k
文件大小:1k
源码类别:

书籍源码

开发平台:

Visual C++

  1. // ODBCDepartmentSet.cpp : implementation of the CODBCDepartmentSet class
  2. //
  3. #include "stdafx.h"
  4. #include "ODBCDepartment.h"
  5. #include "ODBCDepartmentSet.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CODBCDepartmentSet implementation
  13. IMPLEMENT_DYNAMIC(CODBCDepartmentSet, CRecordset)
  14. CODBCDepartmentSet::CODBCDepartmentSet(CDatabase* pdb)
  15. : CRecordset(pdb)
  16. {
  17. //{{AFX_FIELD_INIT(CODBCDepartmentSet)
  18. m_DepartmentCode = _T("");
  19. m_DepartmentName = _T("");
  20. m_nFields = 2;
  21. //}}AFX_FIELD_INIT
  22. m_nDefaultType = dynaset;
  23. }
  24. CString CODBCDepartmentSet::GetDefaultConnect()
  25. {
  26. return _T("ODBC;DSN=Classes");
  27. }
  28. CString CODBCDepartmentSet::GetDefaultSQL()
  29. {
  30. return _T("[Department]");
  31. }
  32. void CODBCDepartmentSet::DoFieldExchange(CFieldExchange* pFX)
  33. {
  34. //{{AFX_FIELD_MAP(CODBCDepartmentSet)
  35. pFX->SetFieldType(CFieldExchange::outputColumn);
  36. RFX_Text(pFX, _T("[DepartmentCode]"), m_DepartmentCode);
  37. RFX_Text(pFX, _T("[DepartmentName]"), m_DepartmentName);
  38. //}}AFX_FIELD_MAP
  39. }
  40. /////////////////////////////////////////////////////////////////////////////
  41. // CODBCDepartmentSet diagnostics
  42. #ifdef _DEBUG
  43. void CODBCDepartmentSet::AssertValid() const
  44. {
  45. CRecordset::AssertValid();
  46. }
  47. void CODBCDepartmentSet::Dump(CDumpContext& dc) const
  48. {
  49. CRecordset::Dump(dc);
  50. }
  51. #endif //_DEBUG