Icon View Incident Report

Serious Serious
Reported By: Uli Becker
Reported On: 2/13/2009
For: Version 2.02 Build 7
# 2922 Insensitive Query Result Sets Refreshing When They Should Remain Static

After migrating an application from DBISAM I discovered a new problem.

What I am doing is:

1. Iterating a query with records having BackupFlag set to false.
2. Doing something with each record.
3. Marking this record with BackupFlag = true by using a second query.
4. Query.next

Surprisingly the query.recordcount decreases with each update though it is a canned query.

procedure TForm1.Button1Click(Sender: TObject);
begin
  with SelectQuery do
  begin
    close;
    RequestSensitive := false;
    sql.clear;
    sql.add('select SOPInstanceUID, ObjectFile from '+
            'DicomImages where Backup = false');
    open;
  end;
  caption := IntToStr(SelectQuery.RecordCount);
  with MarkQuery do
  begin
    close;
    sql.clear;
    sql.add('update DicomImages set Backup = true '+
            'where SOPInstanceUID = :CurrentUID');
    prepare;
  end;

  SelectQuery.first;
  while not SelectQuery.EOF do
  begin
    with MarkQuery do
    begin
      ParamByName('CurrentUID').asString :=
SelectQuery.FieldByName('SOPInstanceUID').AsString;
      ExecSQL;
    end;
    SelectQuery.next;
    caption := IntToStr(SelectQuery.RecordCount);
    Application.ProcessMessages;
  end;
end;



Resolution Resolution
Fixed Problem on 2/14/2009 in version 2.02 build 8


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image