Visual C++ 6 Unleashed

Visual C++ 6 Unleashed

By MICKEY WILLIAMS and David Bennett

Summary

In this chapter, you explored MFC's support for database operations in your applications.

You learned that most developers will use the AppWizard to begin their MFC ODBC development. It's easy, relatively bug-free, and allows faster development of applications.

You examined the basic classes that MFC provides for working with ODBC datasources—CDatabase, CRecordset, and CRecordView.

You learned that you can use CDatabase functions to execute SQL statements against the datasource, including transactions. You can use the CRecordset class to provide a simple way to move data from rows in the database back and forth between member variables of the recordset by using record field exchange. You saw that, in addition to using recordsets to select rows from a database, you can use recordsets to add, delete, and update rows in the database.

You also looked at how to use the CRecordView class to provide a convenient interface between the user and the data in a recordset, including a special case of dialog data exchange that supports the member variables of an associated recordset.

Finally, you learned that for efficiency, bulk operations are supported in the MFC ODBC API. This chapter showed you how to implement this feature.

Share ThisShare This

Informit Network