home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / dbmsg / ado / getrows / getrdlg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-15  |  1.6 KB  |  67 lines

  1. //--------------------------------------------------------------------
  2. // Microsoft ADO Samples
  3. //
  4. // (c) 1996 Microsoft Corporation.  All Rights Reserved.
  5. //
  6. // @doc GetRows Sample
  7. //
  8. // @module    getrdlg.h
  9. //
  10. // @devnote None
  11. //--------------------------------------------------------------------
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CGetRowsDlg dialog
  15.  
  16. class CGetRowsDlg : public CDialog
  17. {
  18. // Construction
  19. public:
  20.     CGetRowsDlg(CWnd* pParent = NULL);    // standard constructor
  21.     ~CGetRowsDlg();
  22.  
  23.     //Performs the standard DAO GetRows
  24.     HRESULT DoGetRows();
  25.                 
  26.  
  27. // Dialog Data
  28.     //{{AFX_DATA(CGetRowsDlg)
  29.     enum { IDD = IDD_MAINFORM };
  30.         // NOTE: the ClassWizard will add data members here
  31.     //}}AFX_DATA
  32.  
  33.     // ClassWizard generated virtual function overrides
  34.     //{{AFX_VIRTUAL(CGetRowsDlg)
  35.     protected:
  36.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  37.     //}}AFX_VIRTUAL
  38.  
  39. // Implementation
  40. protected:
  41.     HICON m_hIcon;
  42.     ADOConnection*            m_piConnection;
  43.     ADORecordset*            m_piEmpRecordSet;
  44.     CString                    m_strSource;
  45.     CString                    m_strUser;
  46.     CString                    m_strPassword;
  47.     CString                    m_strSQL;
  48.  
  49.     void OnExecute();
  50.     // Generated message map functions
  51.     //{{AFX_MSG(CGetRowsDlg)
  52.     virtual BOOL OnInitDialog();
  53.     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  54.     afx_msg void OnPaint();
  55.     afx_msg HCURSOR OnQueryDragIcon();
  56.     //}}AFX_MSG
  57.     DECLARE_MESSAGE_MAP()
  58. };
  59.  
  60. // Field numbers for employee table
  61. #define    EMP_ID            0L // Must use LONG or compiler gets confused with NULL
  62. #define    EMP_LNAME        1
  63. #define    EMP_FNAME        2
  64. #define MAX_EMP_REC        10 // Arbitrary maximum
  65.  
  66.  
  67.