Icon View Incident Report

Serious Serious
Reported By: Terry Swiers
Reported On: 1/3/2020
For: Version 2.31 Build 10
# 4771 Changing the RequestSensitive Property Between TEDBQuery Executions Can Cause Incorrect Results

There are 2 conditions required to replicate the issue:

1. The query has to be parameterized
2. The query sensitivity has to change between executions

The code below is rough code that reproduces the issue.

    procedure SQLCacheTest;
    var
    Number : Integer;
    Q1, Q2 : TEDBQuery;
    RecCount1, RecCount2 : Integer;
    begin
    Number := 1;
    Q1 := GetQueryObjectSQL('select * from atable where number = :Number');
    Q1.RequestSensitive := True;
    Q1.ParamByName('Number').AsInteger := Number;
    Q1.Open;
    RecCount1 := Q1.RecordCount;
    Q1.Free;
    assert(RecCount1 > 0, 'No records to test with, please select a different number');


    Q2 := GetQueryObjectSQL('select * from atable where number = :Number');
    Q2.RequestSensitive := False;
    Q2.ParamByName('Number').AsInteger := Number;
    Q2.Open;
    RecCount2 := Q2.RecordCount;
    Q2.Free;
    assert(RecCount1 = RecCount2, 'Record Count Missmatch');
    end;



Resolution Resolution
Fixed Problem on 1/6/2020 in version 2.31 build 11


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 PHP Standard
ElevateDB PHP Standard with Source
ElevateDB PHP Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image