我的删除代码是这么写的: if MessageBox(Handle, '确认删除选中的记录?', strCaption, MB_YESNO +
MB_DEFBUTTON2 + MB_ICONQUESTION) = mrYES then
begin
try
with ADODataSet1 do
begin
Edit;
FieldByName('State').AsString := '废码';
Post;
ShowMessage(IntToStr(RecordCount));
end;
finally
end;
end;不是将数据物理删除,而是加了一个修改了标志字段State。adodateset的过滤器过滤了所有的废码记录,但是在删除最后一条记录的时候出了问题,我不知道是怎么了错误信息为:---------------------------
Debugger Exception Notification
---------------------------
Project PAPSoft2.exe raised exception class EOleException with message 'BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
请高手指教
MB_DEFBUTTON2 + MB_ICONQUESTION) = mrYES then
begin
try
with ADODataSet1 do
begin
Edit;
FieldByName('State').AsString := '废码';
Post;
ShowMessage(IntToStr(RecordCount));
end;
finally
end;
end;不是将数据物理删除,而是加了一个修改了标志字段State。adodateset的过滤器过滤了所有的废码记录,但是在删除最后一条记录的时候出了问题,我不知道是怎么了错误信息为:---------------------------
Debugger Exception Notification
---------------------------
Project PAPSoft2.exe raised exception class EOleException with message 'BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
请高手指教
是不是delete之后又next