Share via


ODBC and the Database Classes

OverviewHow Do IFAQSampleODBC Driver List

The MFC ODBC database classes encapsulate the ODBC API function calls you would normally make yourself in the member functions of the and classes. For example, the complex ODBC call sequences, binding of returned records to storage locations, handling of error conditions, and other operations are managed for you by the database classes. As a result, you use a considerably simpler class interface to manipulate records through a recordset object.

****Note   ****ODBC data sources are accessible through the MFC ODBC classes, as described in this article, or through the MFC Data Access Object (DAO) classes. For information about the DAO classes, see the article DAO and MFC.

Although the database classes encapsulate ODBC functionality, they do not provide a one-to-one mapping of ODBC API functions. The database classes provide a higher level of abstraction, modeled after data-access objects found in Microsoft Access and Microsoft Visual Basic. For more information, see What Is the MFC Database Programming Model?.