Visual C++ provides several ways to work with databases. You can directly call database API functions from the DAO or ODBC Software Development Kits (SDKs), or you can choose to use the Microsoft Foundation Class Library (MFC), and let the MFC DAO and ODBC classes simplify working with either database API. New features in this release of Visual C++ include support for ActiveX Data Objects (ADO) 2.0, Microsoft's new, high-level interface to all kinds of data; integration with the Microsoft Visual Data Tools; and OLE DB templates to simplify programming with OLE DB.
This section provides an overview of the following Visual C++ data access features.
The new release of ADO features a simpler object model, better integration with Microsoft and non-Microsoft technologies, a common interface for both local and remote data access, remotable and disconnected recordsets, a user-accessible data binding interface, and hierarchical recordsets.
For More Information See the following topics online in MSDN Library Visual Studio 6.0.
The Microsoft Visual Database Tools (Database Designer and Query Designer) provide a visual interface to help you create and modify database structures (schemas) and queries. You can create SQL Server and Oracle database tables, use drag-and-drop operations to create views, and automatically change column data types.
Visual C++, Professional Edition includes the Query Designer. With Visual C++, Professional Edition, you can create and edit queries, and execute stored procedures.
For More Information See Introducing Microsoft Visual Database Tools, online in MSDN Library Visual Studio 6.0.
OLE DB templates make the high-performance OLE DB data access technology much easier to use by providing classes that implement many of the commonly used OLE DB interfaces. The OLE DB templates are provided in the form of a template library, similar to ATL. In addition, wizard support is available to generate code for common scenarios.
The classes in the OLE DB template library can be divided into two groups: the consumer classes, which you use to implement a database client (consumer) application, and the provider classes, which you use to implement a database server (provider) application.
For More Information See the following topics online in MSDN Library Visual Studio 6.0.
The MFC database classes help you store information in a database. MFC contains two sets of database classes — DAO and ODBC — which provide similar functionality. The DAO classes are implemented using Data Access Objects; the ODBC classes are implemented using Open Database Connectivity.
In general, use the MFC DAO classes when you want to work with databases that use the Microsoft® Jet database engine, such as Microsoft Access databases (.mdb files). (You can also use DAO to work with external databases, such as ODBC data sources.) Use the MFC ODBC classes when you are not using Jet and you want to work with the ODBC API for complete data-source independence.
For More Information See Database Topics (General), online in MSDN Library Visual Studio 6.0.