home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / STDREG.PAK / ENROLSET.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  1.8 KB  |  75 lines

  1. // enrollset.cpp : implementation file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include "stdafx.h"
  14. #include "stdreg.h"
  15. #include "enrolset.h"
  16.  
  17. #ifdef _DEBUG
  18. #undef THIS_FILE
  19. static char BASED_CODE THIS_FILE[] = __FILE__;
  20. #endif
  21.  
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CEnrollmentSet
  24.  
  25. IMPLEMENT_DYNAMIC(CEnrollmentSet, CRecordset)
  26.  
  27. CEnrollmentSet::CEnrollmentSet(CDatabase* pdb)
  28.     : CRecordset(pdb)
  29. {
  30.     //{{AFX_FIELD_INIT(CEnrollmentSet)
  31.     m_StudentID = 0;
  32.     m_CourseID = "";
  33.     m_SectionNo = "";
  34.     m_Grade = "";
  35.     m_nFields = 4;
  36.     //}}AFX_FIELD_INIT
  37. }
  38.  
  39.  
  40. CString CEnrollmentSet::GetDefaultConnect()
  41. {
  42.     return "ODBC;DSN=Student Registration;";
  43. }
  44.  
  45. CString CEnrollmentSet::GetDefaultSQL()
  46. {
  47.     return "ENROLLMENT";
  48. }
  49.  
  50. void CEnrollmentSet::DoFieldExchange(CFieldExchange* pFX)
  51. {
  52.     //{{AFX_FIELD_MAP(CEnrollmentSet)
  53.     pFX->SetFieldType(CFieldExchange::outputColumn);
  54.     RFX_Long(pFX, "StudentID", m_StudentID);
  55.     RFX_Text(pFX, "CourseID", m_CourseID);
  56.     RFX_Text(pFX, "SectionNo", m_SectionNo);
  57.     RFX_Text(pFX, "Grade", m_Grade);
  58.     //}}AFX_FIELD_MAP
  59. }
  60.  
  61. /////////////////////////////////////////////////////////////////////////////
  62. // CEnrollmentSet diagnostics
  63.  
  64. #ifdef _DEBUG
  65. void CEnrollmentSet::AssertValid() const
  66. {
  67.     CRecordset::AssertValid();
  68. }
  69.  
  70. void CEnrollmentSet::Dump(CDumpContext& dc) const
  71. {
  72.     CRecordset::Dump(dc);
  73. }
  74. #endif //_DEBUG
  75.