PRB: CRecordset Does Not Skip Deleted Records (156977)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2b
- Microsoft Visual C++, 32-bit Professional Edition 4.2b
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q156977 SYMPTOMS
You may continue to see deleted records when using the CRecordset and
CRecordView classes with a snapshot recordset.
CAUSE
The default behavior of the MFC ODBC classes has changed. It is now
possible to move onto a record that has been deleted. If the current
record has been deleted, the CRecordset IsDeleted() function will return
TRUE.
RESOLUTION
Open your CRecordset using the skipDeletedRecords option, or check
IsDeleted() to ensure that the current record is valid before using it.
STATUS
This behavior is by design.
REFERENCES
See the documentation for CRecordset::Open() and
CRecordset::IsDeleted(), as well as the MFC 4.2 Encyclopedia articles
entitled "Recordset: How Addnew, Edit, and Delete Work" and "Recordset:
Adding, Updating, and Deleting Records"
Modification Type: | Major | Last Reviewed: | 12/10/2003 |
---|
Keywords: | kbDatabase kbprb kbprogramming KB156977 |
---|
|