Icon View Incident Report

Serious Serious
Reported By: Heiko Knuettel
Reported On: 8/20/2008
For: Version 2.01 Build 4
# 2760 Executing an Un-Optimized Locate On a Ranged TEDBTable Component Can Cause Incorrect Row Display

I have a problem with master/detail grids: In some situations, the detail grid shows not the right number of rows. Either some rows are missing, or some rows are present twice.

RecordCount shows the correct number of rows, and after a Refresh the display is fine again.

I finally managed to reproduce it...the problem shows, when you set a range on a table, and do a locate after that.

procedure TForm1.Button1Click(Sender: TObject);
var appdir: String;
begin
   appdir := includetrailingpathdelimiter(extractfilepath(application.ExeName));

   with EDBEngine1 do begin
      ConfigPath := appdir;
      Open;
   end;

   with EDBSession1 do begin
      LoginUser := 'Administrator';
      LoginPassword := 'EDBDefault';
      Open;
   end;

   with EDBQuery1 do begin
      DatabaseName := 'Configuration';

      SQL.Text := 'drop database db1 keep contents';
      try ExecSQL; except end;

      SQL.Text := 'create database db1 path '+quotedstr(appdir);
      try ExecSQL; except end;
   end;

   with EDBDatabase1 do begin
      Database := 'db1';
      Open;
   end;

   with KDBTable1 do begin
      SessionName  := 'session';
      DatabaseName := 'database';
      TableName    := 'bericht';
      Open;
      IndexFieldNames := 'aufnr;pruefbericht';
      SetRange([-19972],[-19972]);
      Locate('berichtnr', '126/M19972-3/08', []);
   end;

   with KDBTable2 do begin
      SessionName  := 'session';
      DatabaseName := 'database';
      TableName    := 'bericht';
      Open;
      IndexFieldNames := 'aufnr;pruefbericht';
      SetRange([-19972],[-19972]);
   end;   
end;



Comments Comments and Workarounds
The problem only occurs with un-optimized Locate searches. The workaround is to add the appropriate index to ensure that the Locate is optimized and can use an available index.


Resolution Resolution
Fixed Problem on 8/21/2008 in version 2.01 build 5


Products Affected Products Affected
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image