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

  1. // dsectset.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 "dsectset.h"
  16.  
  17. #ifdef _DEBUG
  18. #undef THIS_FILE
  19. static char BASED_CODE THIS_FILE[] = __FILE__;
  20. #endif
  21.  
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CDynabindSectionSet
  24.  
  25. IMPLEMENT_DYNAMIC(CDynabindSectionSet, CRecordset)
  26.  
  27. CDynabindSectionSet::CDynabindSectionSet(CDatabase* pdb)
  28.     : CRecordset(pdb)
  29. {
  30.     //{{AFX_FIELD_INIT(CDynabindSectionSet)
  31.     m_CourseID = "";
  32.     m_SectionNo = "";
  33.     m_InstructorID = "";
  34.     m_RoomNo = "";
  35.     m_Schedule = "";
  36.     m_Capacity = 0;
  37.     m_LabRoomNo = "";
  38.     m_LabSchedule = "";
  39.     m_nFields = 8;
  40.     //}}AFX_FIELD_INIT
  41. }
  42.  
  43.  
  44. CString CDynabindSectionSet::GetDefaultConnect()
  45. {
  46.     return "ODBC;DSN=Student Registration;";
  47. }
  48.  
  49. CString CDynabindSectionSet::GetDefaultSQL()
  50. {
  51.     return "DYNABIND_SECTION";
  52. }
  53.  
  54. void CDynabindSectionSet::DoFieldExchange(CFieldExchange* pFX)
  55. {
  56.     //{{AFX_FIELD_MAP(CDynabindSectionSet)
  57.     pFX->SetFieldType(CFieldExchange::outputColumn);
  58.     RFX_Text(pFX, "CourseID", m_CourseID);
  59.     RFX_Text(pFX, "SectionNo", m_SectionNo);
  60.     RFX_Text(pFX, "InstructorID", m_InstructorID);
  61.     RFX_Text(pFX, "RoomNo", m_RoomNo);
  62.     RFX_Text(pFX, "Schedule", m_Schedule);
  63.     RFX_Int(pFX, "Capacity", m_Capacity);
  64.     RFX_Text(pFX, "LabRoomNo", m_LabRoomNo);
  65.     RFX_Text(pFX, "LabSchedule", m_LabSchedule);
  66.     //}}AFX_FIELD_MAP
  67. }
  68.  
  69. /////////////////////////////////////////////////////////////////////////////
  70. // CDynabindSectionSet diagnostics
  71.  
  72. #ifdef _DEBUG
  73. void CDynabindSectionSet::AssertValid() const
  74. {
  75.     CRecordset::AssertValid();
  76. }
  77.  
  78. void CDynabindSectionSet::Dump(CDumpContext& dc) const
  79. {
  80.     CRecordset::Dump(dc);
  81. }
  82. #endif //_DEBUG
  83.