Icon View Incident Report

Serious Serious
Reported By: Dave Riley
Reported On: 3/25/2003
For: Version 3.24 Build 1
# 1384 Deleting Records from a Table in Reverse Order Causes an 8708 "Record Changed" Error

Deleting records in a table in reverse order (last to first) will cause an 8708 error at some point.

procedure TForm1.tblItemBeforeDelete(DataSet: TDataSet);
begin
  Memo1.Lines.Add(Format('deleting Item JobID %u ItemID %u',
    [tblItemJobID.Value, tblItemItemID.Value]));

  // delete records from last to first
  tblMat.Last;

  while tblMat.RecordCount > 0 do begin

  // if you uncomment the tblMat.Last then no error occurs but the 
lines
  // logged to Memo1 show that the table position before and after 
Last is
  // different - I 
don't think this should be the case as after a Delete
  // at EOF the table should automatically position itself at the next to
  // last record

//    Memo1.Lines.Add(Format('Del 
JobID %u ItemID %u ResID %u... (Before 
Last)',
//      [tblMatJobID.Value, tblMatItemID.Value, tblMatResID.Value]));

//    tblMat.Last;

    Memo1.Lines.Add(Format('Del 
JobID %u ItemID %u ResID %u... (After Last)',
      [tblMatJobID.Value, tblMatItemID.Value, tblMatResID.Value]));

    tblMat.Delete;
  end;
end;



Resolution Resolution
Fixed Problem on 4/10/2003 in version 3.25 build 1
Image