Icon View Incident Report

Minor Minor
Reported By: Maarten Heuvel
Reported On: 3/9/2006
For: Version 4.22 Build 3
# 2167 Using SetRange without Setting Any Field Values Causes Incorrect Information in Ranged Property

To simulate you need a DBisamTable with an PrimaryKey field.

SetRangeStart/SetRangeEnd/ApplyRange without initializing any Keyfield sets the Recordcount to zero and the Ranged property to false.

Any findkey cancelrange or other database commands on this table will fail afterwards.

  DBISAMTable1.Active:=True;
  DBISAMTable1.setrangestart;
  DBISAMTable1.KeyFieldCount:=1;
  DBISAMTable1.setrangeend;
  DBISAMTable1.KeyFieldCount:=1;
  DBISAMTable1.ApplyRange;
  Showmessage('Recordcount:'+Inttostr(DBISAMTable1.RecordCount));
  Showmessage('PhysicalRecordcount:'+Inttostr(DBISAMTable1.
PhysicalRecordcount));
  if DBISAMTable1.Ranged then
    Showmessage('Ranged')
  else
    Showmessage('not Ranged');

  // Error Table Ranges=False! and recordcount = 0

  DBISAMTable1.CancelRange;

  // Error Table recordcount = 0



Comments Comments and Workarounds
The workaround is to make sure to assign at least a NULL value to the first field in the range for both the start and end of the range.


Resolution Resolution
Fixed Problem on 3/12/2006 in version 4.23 build 1


Products Affected Products Affected
DBISAM CLX Client-Server
DBISAM CLX Client-Server with Source
DBISAM CLX Standard
DBISAM CLX Standard with Source
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source

Image