Quote:
If so, perhaps an Update will help. Though you might not be able to update a deleted record.
code:--------------------------------------------------------------------------------
pSet2->Open();
pSet2->MoveLast();
pSet2->MoveFirst();
while(!pSet2->IsEOF())
{
pSet2->Delete();
pSet2->Update();
pSet2->MoveFirst();
}
pSet2->Close();
--------------------------------------------------------------------------------
I am sorry, but this suggestion to use
Quote:
Deleting Records in DAO
For general information about deleting records in DAO, see the topic "Delete Method" in DAO Help.
To delete a record from a recordset
Determine whether your recordset is updatable.
Call the recordset'sCanUpdate member function.
Move to the record you want to edit.
Use any of the recordset's navigation mechanisms that take you to a specific record.
Call the recordset's Delete member function.
You don't call Update for a deletion.
Move to another record before you attempt any other recordset operations.
In table-type and dynaset-type recordset objects, Delete removes the current record and makes it inaccessible. Although you can't edit or use the deleted record, it remains current. Once you move to another record, however, you can’t make the deleted record current again. Subsequent references to a deleted record in a recordset are invalid and cause an exception to be thrown. For more information, see Delete. You can tell whether you’re on a deleted record by calling IsDeleted.