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

The Dynamic Database Class Based on ATL/OLE DB

Rate me:
Please Sign up or sign in to vote.
4.96/5 (19 votes)
23 Apr 20022 min read 124.7K   4.4K   54  
A class to dynamically manipulate databases data using ATL/OLE DB technology
// Query.h : main header file for the QUERY application
//

#if !defined(AFX_QUERY_H__55F1FC9B_8B45_48B1_9E9A_423AC3DC2F65__INCLUDED_)
#define AFX_QUERY_H__55F1FC9B_8B45_48B1_9E9A_423AC3DC2F65__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"       // main symbols
#include "DBEngine/ConnectionProps.h"
#include "DBEngine/ConnectionDlg.h"
#include "Query_i.h"

/////////////////////////////////////////////////////////////////////////////
// CQueryApp:
// See Query.cpp for the implementation of this class
//

class CQueryApp : public CWinApp
{
public:
	CQueryApp();

	ATL::CSession		m_Session;
	ATL::CDataSource	m_DataSource;
	CConnectionProps	m_props;

// Implementation
	
	bool OpenDatabase();


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CQueryApp)
	public:
	virtual BOOL InitInstance();
		virtual int ExitInstance();
	//}}AFX_VIRTUAL

// Implementation
	//{{AFX_MSG(CQueryApp)
	afx_msg void OnAppAbout();
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	BOOL m_bATLInited;
private:
	BOOL InitATL();
};

ATL::CSession* GetSession();
ATL::CDataSource* GetDataSource();

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

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_QUERY_H__55F1FC9B_8B45_48B1_9E9A_423AC3DC2F65__INCLUDED_)

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior)
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