Icon View Incident Report

Serious Serious
Reported By: Farshad R. Vossoughi
Reported On: 2/15/1999
For: Version 1.11 Build 1
# 301 Filters and Locates are Producing Incorrect Results

I have installed DBISAM version 1.11, and have been experiencing reproducible Index Corruption. The following is a description of what I have done. My database contains 2 tables they are:


Category has two fields, CategoryID (Integer, Primary Index) and Name (String 50, Indexed NOT Unique and Case Insensitive)

Subcategories has three fields, SubCategoryID (Integer, Primary Index), CategoryID (Integer, Indexed NOT Unique) and Name (String 50, Indexed NOT Unique and Case Insensitive)

Now, lets assume you have two records in the Subcategories table and have the following data
1 1 Test1
2 1 Test2

I find records within the Subcategories table using the following method:

TbSubcategories.Locate('Name;CategoryID', VarArrayOf(['Test2', 1]), [loCaseInsensitive]);

The above call successfully locates the right record, however, if I call tbSubcategories.Delete, I can no longer see the first record using Filters


After the Delete, tbSubcategories.Filter:= 'CategoryID = 1';

This condition remains until I call RepairTable, then its is fixed so long as the Delete method is not called.

Things I do not understand:

If I locate a record using a single field, everything works fine.

If I create the above problem, then go into DBISAM Database utility and issue a SQL query such as:


Then the deleted record shows up not the valid record unless I have "Want Live Result Set" checked.

Comments Comments
Problem was with the internal index kept by DBISAM on deleted records containing the incorrect physical record numbers. Any data file prior to the 1.12 release but later than the 1.07 release could have this problem. The problem is corrected by repairing the tables using the 1.12 release of DBISAM. Also, this bug does not cause any data corruption and searching using FindKey, GotoKey, etc. and using ranges are not affected by this bug. The only thing affected is Locates that are not optimized (internally they use expression filters) and Expression Filters.

Resolution Resolution
Fixed Problem on 2/15/1999 in version 1.12 build 1