ADO Row Marked for Deletion



Hey All,

Why in heck is this throwing a Row Marked for deletion error? I am kind of a newbie when it comes to Delphi.

In using batch updates (ltBatchOptimistic) I keep running into an error when I try to CancelUpdates, it says "Row affected is deleted or marked for deletion" or somethin to that effect.

procedure TdmLogInfo.CancelJob;
var
 i: smallint;
begin
 for i := high(aTables) downto 0 do begin
     with aTables[i] do begin
     DisableControls;
     try
       if (State in [dsEdit,dsInsert]) then Cancel;
       CancelUpdates;
     finally
       EnableControls ;
     end;
   end;
 end;
end;

Josh
.