Share via


Overview: Creating a Program That Supports a Database

OverviewDetails

When you create a new MFC program you can include database support as one of the options. You can provide your own database classes or use MFC database classes. MFC includes database classes for programming with Open Database Connectivity (ODBC) or with Data Access Objects (DAO).

To create a program that supports a database, you use the MFC AppWizard (EXE version) and in Step 2 you choose the appropriate database options. There are three options for database support:

  • Header files only This option provides the minimal level of database support in an MFC program. AppWizard includes the database header files and link libraries. You create any database-specific classes.

  • Database view without file support This option provides document support but no link support. AppWizard creates database header files, link libraries, and creates a record view and recordset for you.

  • Database view with file support This option provides document support and serialization support. AppWizard creates database header files, link libraries, and creates a record view and recordset for you.

Click here for more detailed information on choosing Database options when using the MFC AppWizard.

You can also create a direct database project, click here for more information.

What do you want to do?