麻烦大家看看, 帮帮忙!!!!
xxvc 2002-05-12 10:49:49 采用ODBC用如下代码可以删除*.mdb上的记录,但现在却无法删除*.dbf上的记录,
恳请高手指点!!!!!
CRecordsetStatus status;
try
{
m_pSet->Delete();
}
catch(CDBException* e)
{
AfxMessageBox(e->m_strError);
e->Delete();
m_pSet->MoveFirst(); // lost our place!
UpdateData(FALSE);
return FALSE;
}
m_pSet->GetStatus(status);
if (status.m_lCurrentRecord == 0)
{
// We deleted last of 2 records
m_pSet->MoveFirst();
}
else
{
m_pSet->MoveNext();
}
UpdateData(FALSE);