home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / MS_VC.50 / VC / MFC / SRC / DBVIEW.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-04  |  15.0 KB  |  634 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1997 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. #include "stdafx.h"
  12.  
  13. #ifdef AFX_DB_SEG
  14. #pragma code_seg(AFX_DB_SEG)
  15. #endif
  16.  
  17. #ifdef _DEBUG
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21.  
  22. #define new DEBUG_NEW
  23.  
  24. // This message will be displayed if scrolling on deleted record
  25. static const TCHAR szDeleted[] = _T("<Deleted>");
  26.  
  27. /////////////////////////////////////////////////////////////////////////////
  28.  
  29. BEGIN_MESSAGE_MAP(CRecordView, CFormView)
  30.     //{{AFX_MSG_MAP(CRecordView)
  31.         // NOTE - the ClassWizard will add and remove mapping macros here.
  32.     //}}AFX_MSG_MAP
  33.     ON_COMMAND_EX(ID_RECORD_FIRST, OnMove)
  34.     ON_UPDATE_COMMAND_UI(ID_RECORD_FIRST, OnUpdateRecordFirst)
  35.     ON_COMMAND_EX(ID_RECORD_PREV, OnMove)
  36.     ON_UPDATE_COMMAND_UI(ID_RECORD_PREV, OnUpdateRecordPrev)
  37.     ON_COMMAND_EX(ID_RECORD_NEXT, OnMove)
  38.     ON_UPDATE_COMMAND_UI(ID_RECORD_NEXT, OnUpdateRecordNext)
  39.     ON_COMMAND_EX(ID_RECORD_LAST, OnMove)
  40.     ON_UPDATE_COMMAND_UI(ID_RECORD_LAST, OnUpdateRecordLast)
  41. END_MESSAGE_MAP()
  42.  
  43.  
  44. CRecordView::CRecordView(LPCTSTR lpszTemplateName)
  45.     : CFormView(lpszTemplateName)
  46. {
  47. }
  48.  
  49. CRecordView::CRecordView(UINT nIDTemplate)
  50.     : CFormView(nIDTemplate)
  51. {
  52. }
  53.  
  54. CRecordView::~CRecordView()
  55. {
  56. }
  57.  
  58. void CRecordView::OnInitialUpdate()
  59. {
  60.     CRecordset* pRecordset = OnGetRecordset();
  61.     // recordset must be allocated already
  62.     ASSERT(pRecordset != NULL);
  63.  
  64.     if (!pRecordset->IsOpen())
  65.     {
  66.         CWaitCursor wait;
  67.         pRecordset->Open();
  68.     }
  69.  
  70.     CFormView::OnInitialUpdate();
  71. }
  72.  
  73. BOOL CRecordView::IsOnFirstRecord()
  74. {
  75.     ASSERT_VALID(this);
  76.     CRecordsetStatus status;
  77.     OnGetRecordset()->GetStatus(status);
  78.     return status.m_lCurrentRecord == 0;
  79. }
  80.  
  81. BOOL CRecordView::IsOnLastRecord()
  82. {
  83.     ASSERT_VALID(this);
  84.     CRecordset* pRecordset = OnGetRecordset();
  85.     CRecordsetStatus status;
  86.     pRecordset->GetStatus(status);
  87.     if (!status.m_bRecordCountFinal)
  88.         return FALSE;
  89.     return ((status.m_lCurrentRecord+1 == pRecordset->GetRecordCount()));
  90. }
  91.  
  92. BOOL CRecordView::OnMove(UINT nIDMoveCommand)
  93. {
  94.     CRecordset* pSet = OnGetRecordset();
  95.     if (pSet->CanUpdate() && !pSet->IsDeleted())
  96.     {
  97.         pSet->Edit();
  98.         if (!UpdateData())
  99.             return TRUE;
  100.  
  101.         pSet->Update();
  102.     }
  103.  
  104.     switch (nIDMoveCommand)
  105.     {
  106.         case ID_RECORD_PREV:
  107.             pSet->MovePrev();
  108.             if (!pSet->IsBOF())
  109.                 break;
  110.  
  111.         case ID_RECORD_FIRST:
  112.             pSet->MoveFirst();
  113.             break;
  114.  
  115.         case ID_RECORD_NEXT:
  116.             pSet->MoveNext();
  117.             if (!pSet->IsEOF())
  118.                 break;
  119.             if (!pSet->CanScroll())
  120.             {
  121.                 // clear out screen since we're sitting on EOF
  122.                 pSet->SetFieldNull(NULL);
  123.                 break;
  124.             }
  125.  
  126.         case ID_RECORD_LAST:
  127.             pSet->MoveLast();
  128.             break;
  129.  
  130.         default:
  131.             // Unexpected case value
  132.             ASSERT(FALSE);
  133.     }
  134.  
  135.     // Show results of move operation
  136.     UpdateData(FALSE);
  137.     return TRUE;
  138. }
  139.  
  140. void CRecordView::OnUpdateRecordFirst(CCmdUI* pCmdUI)
  141. {
  142.     CRecordset* prs = OnGetRecordset();
  143.  
  144.     // enable if opened, can scroll backwards,
  145.     pCmdUI->Enable(prs->IsOpen() && prs->CanScroll() &&
  146.         // >= 1 records present and not already on first record
  147.         !(prs->IsEOF() && prs->IsBOF()) && !IsOnFirstRecord());
  148. }
  149.  
  150. void CRecordView::OnUpdateRecordPrev(CCmdUI* pCmdUI)
  151. {
  152.     CRecordView::OnUpdateRecordFirst(pCmdUI);
  153. }
  154.  
  155. void CRecordView::OnUpdateRecordNext(CCmdUI* pCmdUI)
  156. {
  157.     CRecordset* prs = OnGetRecordset();
  158.  
  159.     // enable if opened and >= 1 records present
  160.     pCmdUI->Enable(prs->IsOpen() && !(prs->IsEOF() && prs->IsBOF())
  161.         // and not already on last record
  162.         && !IsOnLastRecord());
  163. }
  164.  
  165. void CRecordView::OnUpdateRecordLast(CCmdUI* pCmdUI)
  166. {
  167.     CRecordset* prs = OnGetRecordset();
  168.  
  169.     // enable if opened, can scroll,
  170.     pCmdUI->Enable(prs->IsOpen() && prs->CanScroll() &&
  171.         // >= 1 records present and not already on last record
  172.         !(prs->IsEOF() && prs->IsBOF()) && !IsOnLastRecord());
  173. }
  174.  
  175.  
  176.  
  177. /////////////////////////////////////////////////////////////////////////////
  178. // DDX Cover functions for use with fields of a recordset
  179.  
  180. /////////////////////////////////////////////////////////////////////////////
  181. // Simple field formatting to text item
  182.  
  183. BOOL AFXAPI AfxFieldText(CDataExchange* pDX, int nIDC, void* pv,
  184.     CRecordset* pRecordset)
  185. {
  186.     ASSERT_VALID(pRecordset);
  187.  
  188.     HWND hWndCtrl = pDX->PrepareEditCtrl(nIDC);
  189.     TCHAR szT[2];
  190.     if (pDX->m_bSaveAndValidate)
  191.     {
  192.         ::GetWindowText(hWndCtrl, szT, _countof(szT));
  193.         if (szT[0] == '\0')
  194.         {
  195.             if (pRecordset->IsFieldNullable(pv))
  196.             {
  197.                 pRecordset->SetFieldNull(pv);
  198.                 return TRUE;
  199.             }
  200.         }
  201.         else
  202.             pRecordset->SetFieldNull(pv, FALSE);
  203.     }
  204.     else
  205.     {
  206.         if (!pRecordset->IsOpen() || pRecordset->IsFieldNull(pv))
  207.         {
  208.             szT[0] = '\0';
  209.             AfxSetWindowText(hWndCtrl, szT);
  210.             return TRUE;
  211.         }
  212.         else if (pRecordset->IsDeleted())
  213.         {
  214.             AfxSetWindowText(hWndCtrl, szDeleted);
  215.             return TRUE;
  216.         }
  217.     }
  218.     return FALSE;
  219. }
  220.  
  221. void AFXAPI DDX_FieldText(CDataExchange* pDX, int nIDC, int& value,
  222.     CRecordset* pRecordset)
  223. {
  224.     if (!AfxFieldText(pDX, nIDC, &value, pRecordset))
  225.         DDX_Text(pDX, nIDC, value);
  226. }
  227.  
  228. void AFXAPI DDX_FieldText(CDataExchange* pDX, int nIDC, BYTE& value,
  229.     CRecordset* pRecordset)
  230. {
  231.     if (!AfxFieldText(pDX, nIDC, &value, pRecordset))
  232.         DDX_Text(pDX, nIDC, value);
  233. }
  234.  
  235. void AFXAPI DDX_FieldText(CDataExchange* pDX, int nIDC, UINT& value,
  236.     CRecordset* pRecordset)
  237. {
  238.     if (!AfxFieldText(pDX, nIDC, &value, pRecordset))
  239.         DDX_Text(pDX, nIDC, value);
  240. }
  241.  
  242. void AFXAPI DDX_FieldText(CDataExchange* pDX, int nIDC, long& value,
  243.     CRecordset* pRecordset)
  244. {
  245.     if (!AfxFieldText(pDX, nIDC, &value, pRecordset))
  246.         DDX_Text(pDX, nIDC, value);
  247. }
  248.  
  249. void AFXAPI DDX_FieldText(CDataExchange* pDX, int nIDC, DWORD& value,
  250.     CRecordset* pRecordset)
  251. {
  252.     if (!AfxFieldText(pDX, nIDC, &value, pRecordset))
  253.         DDX_Text(pDX, nIDC, value);
  254. }
  255.  
  256. void AFXAPI DDX_FieldText(CDataExchange* pDX, int nIDC, CString& value,
  257.     CRecordset* pRecordset)
  258. {
  259.     ASSERT_VALID(pRecordset);
  260.     HWND hWndCtrl = pDX->PrepareEditCtrl(nIDC);
  261.     if (pDX->m_bSaveAndValidate)
  262.     {
  263.         // check if length is too long (this is complicated by Windows NT/J)
  264.         int nLen = ::GetWindowTextLength(hWndCtrl);
  265.         if (nLen > value.GetAllocLength())
  266.         {
  267.             if (!_afxDBCS)
  268.                 AfxFailMaxChars(pDX, value.GetAllocLength());
  269.             CString strTemp;
  270.             ::GetWindowText(hWndCtrl, strTemp.GetBuffer(nLen), nLen+1);
  271.             strTemp.ReleaseBuffer();
  272.             nLen = strTemp.GetLength();
  273.             if (nLen > value.GetAllocLength())
  274.                 AfxFailMaxChars(pDX, value.GetAllocLength());
  275.         }
  276.         // get known length
  277.         ::GetWindowText(hWndCtrl, value.GetBuffer(0), nLen+1);
  278.         value.ReleaseBuffer();
  279.         if (nLen == 0)
  280.         {
  281.             if (pRecordset->IsFieldNullable(&value))
  282.                 pRecordset->SetFieldNull(&value, TRUE);
  283.         }
  284.         else
  285.         {
  286.             pRecordset->SetFieldNull(&value, FALSE);
  287.         }
  288.     }
  289.     else if (pRecordset->IsDeleted())
  290.     {
  291.         AfxSetWindowText(hWndCtrl, szDeleted);
  292.     }
  293.     else
  294.     {
  295.         AfxSetWindowText(hWndCtrl, value);
  296.     }
  297. }
  298.  
  299. void AFXAPI DDX_FieldLBString(CDataExchange* pDX, int nIDC, CString& value,
  300.     CRecordset* pRecordset)
  301. {
  302.     ASSERT_VALID(pRecordset);
  303.  
  304.     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
  305.     if (pDX->m_bSaveAndValidate)
  306.     {
  307.         int nIndex = (int)::SendMessage(hWndCtrl, LB_GETCURSEL, 0, 0L);
  308.         if (nIndex != -1)
  309.         {
  310.             int nLen = (int)::SendMessage(hWndCtrl, LB_GETTEXTLEN, nIndex, 0L);
  311.             if (nLen > value.GetAllocLength())
  312.                 AfxFailMaxChars(pDX, value.GetAllocLength());
  313.             ::SendMessage(hWndCtrl, LB_GETTEXT, nIndex,
  314.                     (LPARAM)(LPSTR)value.GetBuffer(0));
  315.             if (nLen == 0)
  316.             {
  317.                 if (pRecordset->IsFieldNullable(&value))
  318.                     pRecordset->SetFieldNull(&value, TRUE);
  319.             }
  320.             else
  321.             {
  322.                 pRecordset->SetFieldNull(&value, FALSE);
  323.             }
  324.             value.ReleaseBuffer();
  325.         }
  326.         else
  327.         {
  328.             // no selection
  329.             value.GetBufferSetLength(0);
  330.             if (pRecordset->IsFieldNullable(&value))
  331.                 pRecordset->SetFieldNull(&value);
  332.         }
  333.     }
  334.     else
  335.     {
  336.         if (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value))
  337.         {
  338.             SendMessage(hWndCtrl, LB_SETCURSEL, (WPARAM)-1, 0L);
  339.         }
  340.         else
  341.         {
  342.             // set current selection based on data string
  343.             if (::SendMessage(hWndCtrl, LB_SELECTSTRING, (WPARAM)-1,
  344.               (LPARAM)(LPCTSTR)value) == LB_ERR)
  345.             {
  346.                 // no selection match
  347.                 TRACE0("Warning: no listbox item selected.\n");
  348.             }
  349.         }
  350.     }
  351. }
  352.  
  353. void AFXAPI DDX_FieldLBStringExact(CDataExchange* pDX, int nIDC, CString& value,
  354.     CRecordset* pRecordset)
  355. {
  356.     ASSERT_VALID(pRecordset);
  357.  
  358.     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
  359.     if (pDX->m_bSaveAndValidate)
  360.     {
  361.         DDX_FieldLBString(pDX, nIDC, value, pRecordset);
  362.     }
  363.     else
  364.     {
  365.         if (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value))
  366.         {
  367.             SendMessage(hWndCtrl, LB_SETCURSEL, (WPARAM)-1, 0L);
  368.         }
  369.         else
  370.         {
  371.             // set current selection based on data string
  372.             int i = (int)::SendMessage(hWndCtrl, LB_FINDSTRINGEXACT, (WPARAM)-1,
  373.               (LPARAM)(LPCTSTR)value);
  374.             if (i < 0)
  375.             {
  376.                 // no selection match
  377.                 TRACE0("Warning: no listbox item selected.\n");
  378.             }
  379.             else
  380.             {
  381.                 // select it
  382.                 SendMessage(hWndCtrl, LB_SETCURSEL, i, 0L);
  383.             }
  384.         }
  385.     }
  386. }
  387.  
  388. void AFXAPI DDX_FieldLBIndex(CDataExchange* pDX, int nIDC, int& index,
  389.     CRecordset* pRecordset)
  390. {
  391.     ASSERT_VALID(pRecordset);
  392.  
  393.     if (!pDX->m_bSaveAndValidate &&
  394.         (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&index)))
  395.     {
  396.         int nIndex = 0;
  397.         DDX_LBIndex(pDX, nIDC, nIndex);
  398.     }
  399.     else
  400.         DDX_LBIndex(pDX, nIDC, index);
  401. }
  402.  
  403. void AFXAPI DDX_FieldCBString(CDataExchange* pDX, int nIDC, CString& value,
  404.     CRecordset* pRecordset)
  405. {
  406.     ASSERT_VALID(pRecordset);
  407.  
  408.     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
  409.     if (pDX->m_bSaveAndValidate)
  410.     {
  411.         // just get current edit item text (or drop list static)
  412.         int nLen = ::GetWindowTextLength(hWndCtrl);
  413.         if (nLen != -1)
  414.         {
  415.             CString strTemp;
  416.             ::GetWindowText(hWndCtrl, strTemp.GetBuffer(nLen), nLen+1);
  417.             strTemp.ReleaseBuffer();
  418.             nLen = strTemp.GetLength();
  419.             if (nLen > value.GetAllocLength())
  420.                 AfxFailMaxChars(pDX, value.GetAllocLength());
  421.             // get known length
  422.             ::GetWindowText(hWndCtrl, value.GetBuffer(0), nLen+1);
  423.         }
  424.         else
  425.         {
  426.             // for drop lists GetWindowTextLength does not work - assume
  427.             //  preallocated length
  428.             ::GetWindowText(hWndCtrl, value.GetBuffer(0), value.GetAllocLength()+1);
  429.         }
  430.         value.ReleaseBuffer();
  431.         if (value.GetLength() == 0)
  432.         {
  433.             if (pRecordset->IsFieldNullable(&value))
  434.                 pRecordset->SetFieldNull(&value, TRUE);
  435.         }
  436.         else
  437.         {
  438.             pRecordset->SetFieldNull(&value, FALSE);
  439.         }
  440.     }
  441.     else
  442.     {
  443.         if (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value))
  444.         {
  445.             SendMessage(hWndCtrl, CB_SETCURSEL, (WPARAM)-1, 0L);
  446.         }
  447.         else
  448.         {
  449.             // set current selection based on model string
  450.             if (::SendMessage(hWndCtrl, CB_SELECTSTRING, (WPARAM)-1,
  451.                 (LPARAM)(LPCTSTR)value) == CB_ERR)
  452.             {
  453.                 // just set the edit text (will be ignored if DROPDOWNLIST)
  454.                 AfxSetWindowText(hWndCtrl, value);
  455.             }
  456.         }
  457.     }
  458. }
  459.  
  460. void AFXAPI DDX_FieldCBStringExact(CDataExchange* pDX, int nIDC, CString& value,
  461.     CRecordset* pRecordset)
  462. {
  463.     ASSERT_VALID(pRecordset);
  464.  
  465.     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
  466.     if (pDX->m_bSaveAndValidate)
  467.     {
  468.         DDX_FieldCBString(pDX, nIDC, value, pRecordset);
  469.     }
  470.     else
  471.     {
  472.         if (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value))
  473.         {
  474.             SendMessage(hWndCtrl, CB_SETCURSEL, (WPARAM)-1, 0L);
  475.         }
  476.         else
  477.         {
  478.             // set current selection based on data string
  479.             int i = (int)::SendMessage(hWndCtrl, CB_FINDSTRINGEXACT, (WPARAM)-1,
  480.               (LPARAM)(LPCTSTR)value);
  481.             if (i < 0)
  482.             {
  483.                 // no selection match
  484.                 TRACE0("Warning: no combobox item selected.\n");
  485.             }
  486.             else
  487.             {
  488.                 // select it
  489.                 SendMessage(hWndCtrl, CB_SETCURSEL, i, 0L);
  490.             }
  491.         }
  492.     }
  493. }
  494.  
  495. void AFXAPI DDX_FieldCBIndex(CDataExchange* pDX, int nIDC, int& index,
  496.     CRecordset* pRecordset)
  497. {
  498.     ASSERT_VALID(pRecordset);
  499.  
  500.     if (!pDX->m_bSaveAndValidate &&
  501.         (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&index)))
  502.     {
  503.         int nIndex = 0;
  504.         DDX_CBIndex(pDX, nIDC, nIndex);
  505.     }
  506.     else
  507.         DDX_CBIndex(pDX, nIDC, index);
  508. }
  509.  
  510. void AFXAPI DDX_FieldScroll(CDataExchange* pDX, int nIDC, int& value,
  511.     CRecordset* pRecordset)
  512. {
  513.     ASSERT_VALID(pRecordset);
  514.  
  515.     if (!pDX->m_bSaveAndValidate &&
  516.         (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value)))
  517.     {
  518.         int nValue = 0;
  519.         DDX_Scroll(pDX, nIDC, nValue);
  520.     }
  521.     else
  522.         DDX_Scroll(pDX, nIDC, value);
  523. }
  524.  
  525. /////////////////////////////////////////////////////////////////////////////
  526. // Data exchange for special controls
  527.  
  528. void AFXAPI DDX_FieldCheck(CDataExchange* pDX, int nIDC, int& value, CRecordset* pRecordset)
  529. {
  530.     ASSERT_VALID(pRecordset);
  531.  
  532.     HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
  533.     if (pDX->m_bSaveAndValidate)
  534.     {
  535.         value = (int)::SendMessage(hWndCtrl, BM_GETCHECK, 0, 0L);
  536.         ASSERT(value >= 0 && value <= 2);
  537.         if (value == 2)
  538.         {
  539.             if (pRecordset->IsFieldNullable(&value))
  540.                 pRecordset->SetFieldNull(&value);
  541.             else
  542.             {
  543.                 TRACE0("Warning: checkbox value indeterminate and field can't be NULL.\n");
  544.                 // Default to unchecked
  545.                 value = 0;
  546.             }
  547.         }
  548.     }
  549.     else
  550.     {
  551.         if (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value))
  552.         {
  553.             int style = ((int)::GetWindowLong(hWndCtrl, GWL_STYLE) & 0xf);
  554.             if ((style == BS_3STATE || style == BS_AUTO3STATE))
  555.                 value = 2;
  556.             else
  557.             {
  558.                 TRACE0("Warning: field NULL and checkbox can't be indeterminate.\n");
  559.                 // Default to unchecked
  560.                 value = 0;
  561.             }
  562.         }
  563.         if (value < 0 || value > 2)
  564.         {
  565.             value = 0;      // default to off
  566.             TRACE1("Warning: dialog data checkbox value (%d) out of range.\n",
  567.                 value);
  568.         }
  569.         ::SendMessage(hWndCtrl, BM_SETCHECK, (WPARAM)value, 0L);
  570.     }
  571. }
  572.  
  573. void AFXAPI DDX_FieldRadio(CDataExchange* pDX, int nIDC, int& value,
  574.     CRecordset* pRecordset)
  575. {
  576.     ASSERT_VALID(pRecordset);
  577.  
  578.     if (!pDX->m_bSaveAndValidate &&
  579.         (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value)))
  580.         value = -1;
  581.     DDX_Radio(pDX, nIDC, value);
  582.     if (pDX->m_bSaveAndValidate)
  583.     {
  584.         if (value == -1 && !pRecordset->IsFieldNullable(&value))
  585.         {
  586.             AfxFailRadio(pDX);
  587.         }
  588.         else
  589.         {
  590.             pRecordset->SetFieldNull(&value, (value == -1));
  591.         }
  592.     }
  593. }
  594.  
  595. /////////////////////////////////////////////////////////////////////////////
  596.  
  597. #ifdef _DEBUG
  598. void CRecordView::AssertValid() const
  599. {
  600.     CFormView::AssertValid();
  601. }
  602.  
  603. void CRecordView::Dump(CDumpContext& dc) const
  604. {
  605.     CFormView::Dump(dc);
  606.  
  607.     dc << "m_bOnFirstRecord = " << m_bOnFirstRecord;
  608.     dc << "\nm_bOnLastRecord = " << m_bOnLastRecord;
  609.  
  610.     dc << "\n";
  611. }
  612. #endif
  613.  
  614. //////////////////////////////////////////////////////////////////////////////
  615. // Inline function declarations expanded out-of-line
  616.  
  617. #ifndef _AFX_ENABLE_INLINES
  618.  
  619. static char _szAfxDbInl[] = "afxdb.inl";
  620. #undef THIS_FILE
  621. #define THIS_FILE _szAfxDbInl
  622. #define _AFXDBVIEW_INLINE
  623. #include "afxdb.inl"
  624.  
  625. #endif
  626.  
  627. #ifdef AFX_INIT_SEG
  628. #pragma code_seg(AFX_INIT_SEG)
  629. #endif
  630.  
  631. IMPLEMENT_DYNAMIC(CRecordView, CFormView)
  632.  
  633. /////////////////////////////////////////////////////////////////////////////
  634.