AppWizard and Data Sources

You can use AppWizard to build a client and to connect to a data source. The second step of MFC AppWizard (exe) allows you to create an application that uses either an ODBC, DAO, or OLE DB data source. The generated code wraps ODBC syntax in MFC C++ classes. If you choose to use to do this, you can refer to the Databases Samples tutorials to help you with your development process.

The Help system provides information on using MFC to generate applications that use ODBC, DAO, or OLE DB data sources. To get started, simply pull down the Help menu, choose the Search command, and type in "ODBC" or "DAO."

Warning   You cannot use Data View to work with data sources that you specify in AppWizard. Data View works directly with SQL. You can use Data View if you use AppWizard to generate a project and then use the Add Data Source command from the Insert menu to connect to a data source.

AppWizard, OLE, ActiveX, and COM

You can use AppWizard to add MFC-based versions of OLE or ActiveX technologies to your project. You can specify that your application be an OLE server, an OLE container, or both. You can also specify that your application support OLE activation and/or ActiveX controls.

In addition, AppWizard can generate an .exe or a .dll project from which  you can create a COM object using an MFC CCmdTarget class. Read TN038: MFC/OLE IUnknown Implementation and Tom’s Handy Dandy MFC/COM/MIDL Recipe Book for Creating Custom Interfaces in the Microsoft Developer Network Library (MSDN).

Use the ATL COM AppWizardto create a Visual C++ ATL project from which you can create an ActiveX control. For more information on the ATL COM Wizard, see Active Template Library (ATL) Reference.