Icon View Incident Report

Serious Serious
Reported By: Uli Becker
Reported On: 9/22/2008
For: Version 2.01 Build 5
# 2817 Executing a Query with a Parameterized IN Sub-Query Returns Same Results with Different Parameters

I am using this code to prepare a query. When executing the query, the result is the same with both parameters (true and false), though it shouldn't.

Preparation:

with dm.PRPatientenQuery do
 begin
   sql.add('select * from Patienten where PatientenID in');
   sql.add('(select PatientenID from Anforderungen where Ambulant = :Ambulant)');
   prepare;
 end;

Execution:

 with dm.PRPatientenQuery do
 begin
   close;
   ParamByName('Ambulant').asBoolean := true;
   open;
   ShowMessage(inttostr(dm.PRPatientenQuery.recordcount));
   close;
   ParamByName('Ambulant').asBoolean := false;
   open;
   ShowMessage(inttostr(dm.PRPatientenQuery.recordcount));
 end;



Resolution Resolution
Fixed Problem on 9/27/2008 in version 2.02 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 VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image