BUG: when filtering real numbers!

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
michellenweiter
Posts: 29
Joined: Thu 09 Jun 2005 06:23
Location: Bern, Switzerland

BUG: when filtering real numbers!

Post by michellenweiter » Fri 26 Jun 2009 14:45

to reproduce the problem, try this:

OraSession1.Options.Direct := true;

OraQuery.sql.clear;
OraQuery.sql.append('select 165.744 as s_km from dual');

OraQuery.Filter := 's_km = 165.744';
OraQuery.Filtered := true;

=> No result returned! It should find 165.744, but it does not.
With some value it does work, with some other it doesn't.

We announce this problem in April 2009 already.

thanks
michel

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 03 Jul 2009 09:22

We have tried to enhance the accurancy of our code that converts NUMBER to Delphi Double data type. But currently there is no success.

michellenweiter
Posts: 29
Joined: Thu 09 Jun 2005 06:23
Location: Bern, Switzerland

Post by michellenweiter » Fri 03 Jul 2009 09:32

Is there a workaroung for it?

michellenweiter
Posts: 29
Joined: Thu 09 Jun 2005 06:23
Location: Bern, Switzerland

Post by michellenweiter » Mon 31 Aug 2009 14:21

Did you find a solution to this problem?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 04 Sep 2009 11:27

In the next ODAC build we'll add the FloatFilterDelta global variable to the MemData unit. You can set this variable to a positive value. ODAC will consider that a record corresponds to the filter if the difference between Filter value and a value from the record is less then FloatFilterDelta.
For example:

Code: Select all

uses MemData;
...
initialization
  FloatFilterDelta := 1E-10;
end.

Post Reply