FIX: Assertion Or Failure With CDaoDatabase::CreateRelation Method (217216)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
This article was previously published under Q217216 SYMPTOMS
A GPF or assertion occurs when using CDaoDatabase::CreateRelation method against Access 2000 database with Visual C++ version 6.0.
CAUSE
Microsoft confirms that this behavior is due to a bug in the CDaoDatabase::CreateRelation() method in DAO 3.6. The implementation of this method can be found in Daocore.cpp.
In the CDaoDatabase::CreateRelation() method, a DAOFields pointer and a DAOField pointer is declared. In addition, the DAOFields collection is looped through, and the DAOField pointer is used to access a field in the DAOFields collection, and then release is called.
At the end of the method, the following check is implemented:
if (pDAOField != NULL)
pDAOField->Release();
Since pDAOField was used as a temporary it is not set to NULL. As a result, the Release() call draws an assertion in the DAO360.DLL implementation of Release() stating that Release() was called too many times. Consequently, Release() cannot set the pointer (pDAOField) that referenced it to NULL.
Modification Type: | Major | Last Reviewed: | 6/18/2001 |
---|
Keywords: | kbbug kbMDACNoSweep kbVS600sp3fix KB217216 kbAudDeveloper |
---|
|