Bug when setting the filter with a field name ending with"."

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 setting the filter with a field name ending with"."

Post by michellenweiter » Tue 08 Jul 2008 06:28

In the version 6.20.011 of ODAC, everything works fine, but since after this version, when you set the filter using a field name ending with a "." ODAC produces an error telling that this field name is not found.

Ex :

MyOraQuery.sql := SELECT
EMP.EMPNO,
EMP.ENAME AS "Name.",
EMP.JOB,
EMP.SAL
FROM
EMP

MyOraQuery.filter := [MyFieldname.]='Something'

Thanks for fixing this issue.
mitch

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

Post by Plash » Wed 09 Jul 2008 07:52

ODAC have never supported field names with '.' in the filter.

ODAC 6.20.0.11 has a bug that accidentally resulted in the fact that your code was working.

When a field name contains the dot, ODAC searches for an actual field name but not a field alias. So if you have a table that has a field containing the dot, you can use it in the filter. If you have a SQL query with an alias, you cannot use it in the filter.

We cannot fix this behaviour because the fix will break compatibility with previous ODAC versions.

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

Post by michellenweiter » Tue 29 Jul 2008 11:52

You wan't break the compatibility with the previous version if you fix it, because it has always worked this way until your version 6.20 included.

Post Reply