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

  1. // stdset.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 "stdset.h"
  16.  
  17. #ifdef _DEBUG
  18. #undef THIS_FILE
  19. static char BASED_CODE THIS_FILE[] = __FILE__;
  20. #endif
  21.  
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CStudentSet
  24.  
  25. IMPLEMENT_DYNAMIC(CStudentSet, CRecordset)
  26.  
  27. CStudentSet::CStudentSet(CDatabase* pdb)
  28.     : CRecordset(pdb)
  29. {
  30.     //{{AFX_FIELD_INIT(CStudentSet)
  31.     m_StudentID = 0;
  32.     m_Name = "";
  33.     m_GradYear = 0;
  34.     m_nFields = 3;
  35.     //}}AFX_FIELD_INIT
  36. }
  37.  
  38.  
  39. CString CStudentSet::GetDefaultConnect()
  40. {
  41.     return "ODBC;DSN=Student Registration;";
  42. }
  43.  
  44. CString CStudentSet::GetDefaultSQL()
  45. {
  46.     return "STUDENT";
  47. }
  48.  
  49. void CStudentSet::DoFieldExchange(CFieldExchange* pFX)
  50. {
  51.     //{{AFX_FIELD_MAP(CStudentSet)
  52.     pFX->SetFieldType(CFieldExchange::outputColumn);
  53.     RFX_Long(pFX, "StudentID", m_StudentID);
  54.     RFX_Text(pFX, "Name", m_Name);
  55.     RFX_Int(pFX, "GradYear", m_GradYear);
  56.     //}}AFX_FIELD_MAP
  57. }
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CStudentSet diagnostics
  61.  
  62. #ifdef _DEBUG
  63. void CStudentSet::AssertValid() const
  64. {
  65.     CRecordset::AssertValid();
  66. }
  67.  
  68. void CStudentSet::Dump(CDumpContext& dc) const
  69. {
  70.     CRecordset::Dump(dc);
  71. }
  72. #endif //_DEBUG
  73.