void CAddView::OnPopDel()
{
// TODO: 在此添加命令处理程序代码
POSITION pos = m_ListCtrl.GetFirstSelectedItemPosition();
    if (pos == NULL) AfxMessageBox(_T("没有选中的记录!"), MB_ICONEXCLAMATION);
    else
{
AdoIndex = m_ListCtrl.GetNextSelectedItem(pos);//将当前选中的索引传给主索引
if(adStateOpen==m_pRecordset->State)
{
  //CString str ;str.Format ("%d",AdoIndex);MessageBox(str);
  m_pRecordset->MoveFirst ();
  m_pRecordset->Move (AdoIndex);
  m_pRecordset->Delete (adAffectCurrent);
  m_pRecordset->Update ();
  m_ListCtrl.DeleteItem (AdoIndex);
} }
}
这是一个删除表中记录的函数,经过测试其中CtrlList和表的索引AdoIndex没有错误.第一次删除记录也没有错误,但是在第二次删除记录时显示在m_Recordset->MoveFirst()时出现错误.
这到底是怎么回事啊