Home | Overview | How Do I | FAQ | Sample | Tutorial | ODBC Driver List
This family of articles explains what it means to “open” or “create” an MFC DAO object and what it means to “close” the object when you finish with it.
This article discusses how MFC objects are constructed and points to related general articles. The following additional articles discuss the Create, Open, and Close actions:
As with most MFC objects, you use a two-stage process to create the MFC object and put it into an open state.
To create a new MFC DAO object
For details, see each class constructor in the Class Library Reference.
To construct and open an MFC DAO Object
Before you call Open, the object is typically uninitialized and unusable (for exceptions, see CDaoWorkspace::Open). This example shows how to construct and open a CDaoRecordset object:
// CDelinquentSet is derived from CDaoRecordset
// Construct the recordset using the default database
CDelinquentSet rsDelinquentAccts;
// Set the object's properties as needed, then...
rsDelinquentAccts.Open( ); // Using default parameters
For related information, see the following articles:
See Also CDaoWorkspace::Open, CDaoWorkspace::Close, CDaoDatabase::Open, CDaoDatabase::Close, CDaoTableDef::Open, CDaoTableDef::Close, CDaoQueryDef::Open, CDaoQueryDef::Close, CDaoRecordset::Open, CDaoRecordset::Close, CDaoDatabase::Create, CDaoQueryDef::Create, CDaoTableDef::Create, CDaoWorkspace::Create