Icon View Incident Report

Serious Serious
Reported By: Kevin Koehne
Reported On: 7/17/2012
For: Version 2.08 Build 3
# 3598 InSensitive Queries that Use Sensitive Derived Tables Can Return Incorrect Results

I ran into what looks like a bug the other day where a query that used to work was not returning any data. I narrowed the issue down to an issue with using parameters in a sub-query. I recently installed the 2.8.0.3 release.

The following is a sample of some code that fails (e.g. it returns zero rows)

 SQL := 'Select * From ('
         + 'Select ID '
         + 'From tblRateClassRoomDetail '
         + 'Where RateClassRoomId = :ID) mydata ';

dq := TEDBQuery.Create(nil);
dq.SessionName := session.SessionName;
dq.DatabaseName := db.Database;
dq.SQL.Text := sql;
dq.Prepare;



Comments Comments and Workarounds
The problem was with the fact that the outer query was insensitive, while the derived table was (implicitly) sensitive internally via EDB. The workaround was to set the RequestSensitive property to True to make the outer query sensitive also, which would fix the issue.


Resolution Resolution
Fixed Problem on 7/21/2012 in version 2.09 build 1


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