Click here to Skip to main content
15,891,136 members
Articles / Desktop Programming / ATL

ADO Data Bound Class Wizard

Rate me:
Please Sign up or sign in to vote.
4.20/5 (8 votes)
27 Sep 2000CPOL 101.1K   1.7K   42  
ADO Data Bound Class Wizard
// ADORsWizardSheet.h : header file
//
// This class defines custom modal property sheet 
// CADORsWizardSheet.
 
#ifndef __ADORSWIZARDSHEET_H__
#define __ADORSWIZARDSHEET_H__

#include "WizardPage1.h"

/////////////////////////////////////////////////////////////////////////////
// CADORsWizardSheet

class CADORsWizardSheet : public CPropertySheet
{
	DECLARE_DYNAMIC(CADORsWizardSheet)

// Construction
public:
	CADORsWizardSheet(CWnd* pWndParent = NULL);

// Attributes
public:
	CWizardPage1 m_Page1;
	CWizardPage2 m_Page2;
//Attributes
public:
	BOOL m_bIsConnectionOpen;
	_ConnectionPtr m_pConnection;
	CString m_strTableName;
	CString m_strFileName;
	CString m_strDir;
	CString m_strClassName;
// Operations
public:
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CADORsWizardSheet)
	public:
	virtual BOOL OnInitDialog();
	protected:
	virtual void PostNcDestroy();
	//}}AFX_VIRTUAL

// Implementation
public:
	BOOL GenerateFile();
	void CloseDBConnection();
	BOOL FillListOfTables();
	virtual ~CADORsWizardSheet();
	BOOL GetDBConnection();
	void GenerateComError(_com_error &e);
	void GenerateProviderError(_ConnectionPtr pConnection);
	void BuildClassBindingString(FieldPtr pField, LPCTSTR lpszName, int nIndex, CString& strClassAttributes, CString&  strClassMACRO);
// Generated message map functions
protected:
	//{{AFX_MSG(CADORsWizardSheet)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	afx_msg void OnAbout();
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

#endif	// __ADORSWIZARDSHEET_H__

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions