Hello All
My question is in regards to a Delphi 2005 Win32 App I am working on. I have two queries, both of which are set to ltBatchOptimistic, whenever I try and "Cancel" the Data I get a "Row Handled is marked for deletion or has been deleted" error. Below is the Cancel code.
procedure TdmLogInfo.CancelJob;
var
i: smallint;
begin
for i := 0 to high(aTables) do begin
with aTables do begin
DisableControls;
try
if (State in [dsEdit,dsInsert]) then Cancel;
CancelBatch(arCurrent);
finally
EnableControls;
end;
end;
end;
end;
My question is in regards to a Delphi 2005 Win32 App I am working on. I have two queries, both of which are set to ltBatchOptimistic, whenever I try and "Cancel" the Data I get a "Row Handled is marked for deletion or has been deleted" error. Below is the Cancel code.
procedure TdmLogInfo.CancelJob;
var
i: smallint;
begin
for i := 0 to high(aTables) do begin
with aTables do begin
DisableControls;
try
if (State in [dsEdit,dsInsert]) then Cancel;
CancelBatch(arCurrent);
finally
EnableControls;
end;
end;
end;
end;