Chapter Thirty-Two -- Database Management with Microsoft Data Access Objects

Chapter Thirty-Two

In Chapter 31, you saw database management programming with the Microsoft Foundation Class (MFC) Library and Microsoft Open Database Connectivity (ODBC). In this chapter, you'll see a completely different database programming approach—the MFC Data Access Objects (DAO) classes and the underlying DAO software. Actually, the approach is not so different. Instead of the ODBC classes CDatabase and CRecordset, you'll be using CDaoDatabase and CDaoRecordset. The ODBC and DAO classes are so similar (many member function names are the same) that you can convert ODBC applications, such as the examples in Chapter 31, to DAO applications simply by changing class names and little else. Thus, you can look at DAO as a sort of replacement for ODBC. But as you'll see, DAO goes far beyond ODBC.

This chapter merely scratches the surface of DAO, highlighting its features and outlining the differences between DAO and ODBC. Along the way, it explains the relationships between DAO, COM, the Microsoft Jet database engine, Visual Basic for Applications (VBA), and the MFC library. Finally, it presents a dynamic database example.



Programming Microsoft Visual C++
Programming Microsoft Visual C++
ISBN: 1572318570
EAN: 2147483647
Year: 1997
Pages: 332

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net