DepartmentSet.cpp
上传用户:rs600066
上传日期:2017-10-16
资源大小:4788k
文件大小:1k
源码类别:

数据库系统

开发平台:

Visual C++

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