CDaoDatabase::CDaoDatabase
Constructs a CDaoDatabase object.
CDaoDatabase(
CDaoWorkspace* pWorkspace = NULL
);
Parameters
- pWorkspace
A pointer to the CDaoWorkspace object that will contain the new database object. If you accept the default value of NULL, the constructor creates a temporary CDaoWorkspace object that uses the default DAO workspace. You can get a pointer to the workspace object via the m_pWorkspace data member.
Remarks
After constructing the object, if you are creating a new Microsoft Jet (.MDB) database, call the object's Create member function. If you are, instead, opening an existing database, call the object's Open member function.
When you finish with the object, you should call its Close member function and then destroy the CDaoDatabase object.
You might find it convenient to embed the CDaoDatabase object in your document class.
Observação
A CDaoDatabase object is also created implicitly if you open a CDaoRecordset object without passing a pointer to an existing CDaoDatabase object. This database object is closed when you close the recordset object.
Requirements
Header: afxdao.h