DAO: Database Application Design Options

HomeOverviewHow Do IFAQSampleTutorialODBC Driver List

This article continues the discussion begun in the article DAO: Writing a Database Application. The article DAO: Steps in Writing MFC DAO Applications completes the discussion. Those articles discuss the decisions you need to make before you run AppWizard and the steps involved in creating your starter application.

Topics covered include:

Application Design Examples

This article gives examples to suggest some of the ways you might organize your application. Sample applications mentioned in the list are available under Visual C++ Programmer’s Guide/Samples in the documentation.

Examples:

For information about splitter windows, see Enhancing Views in the Scribble tutorial. For information about using multiple views in general, see Multiple Document Types, Views, and Frame Windows.

DAO in DLLs, Multithreaded Applications, and ActiveX Controls

This topic discusses the MFC DAO classes with respect to support for using the MFC DAO classes:

You can use the MFC DAO classes in any DLL, as well as in ActiveX controls. For more information about using the MFC DAO classes in a DLL, see the article DAO: Using DAO in DLLs.

DAO itself is not multithreaded, so you can’t use the MFC DAO classes in multiple threads. Confine your DAO code to a single thread of execution.

Depending on what MFC functionality you call, you should be able to use the MFC DAO classes in console applications as well. Make sure the application uses no graphical user-interface elements. For example, if you’re using an ODBC data source and you supply incomplete connection information, ODBC attempts to display a dialog box for the missing information. Avoid this situation in your console applications.

The MFC DAO classes are fully enabled for Unicode and DBCS.

See Also   DAO: Where Is..., DAO: Database Tasks, DAO: Writing a Database Application, DAO: Steps in Writing MFC DAO Applications, MFC: Using Database Classes with Documents and Views, MFC: Using Database Classes Without Documents and Views