Icon View Incident Report

Serious Serious
Reported By: Wes Peterson
Reported On: 12/2/1998
For: Version 1.07 Build 1
# 250 Deletion of Last Record in a Range Causing Range to Be Reset

I have three tables on a form. (D3.02, DBISAM 1.05) Table1 is controlled by SetRange when the form is activated and this range is supposed to remain in effect for the life of the form. Table2 is linked to Table 1 via Master/Detail Table3 is a "shadow" of Table 2. I use it to handle cascading deletes via Table1's BeforeDelete handler, which looks like this:

if Table2.State in [dsInsert, dsEdit] then
With Table3 do begin
Active := True;
SetRange([Table1ID.Value], [Table1ID.Value]);
While not EOF do
Acive := False;

After this, the range set on Table1 is no longer respected. IOW, Table1 records *outside* of the range become visible in the TDBGrid attached to Table1.

Comments Comments
Problem was with the deletion of the last record in the range in the internal re-positioning code.

Resolution Resolution
Fixed Problem on 12/6/1998 in version 1.08 build 1