Subject Re: [IBO] Filter Stopped Working
Author Helen Borrie
At 11:11 AM 17/04/2007, you wrote:
>I recently upgraded to the latest IB Objects, Firebird 2.01 (from
>1.53) and Vista. My applications all seems to work fine, except for
>one that uses a filter:
>
> Filter := 'SALE_TIME < ''11:59:59.000''';
>
>When I activate the filter, I get a message that there's a problem
>with my SQL. A token, which is the name of a table, suddenly isn't
>recognized.
>
>What might be causing this?

If you study the Fb 2 release notes, you will see that it is no
longer legal to specify joins or subqueries without fully qualifying
every field reference. In addition, it is no longer legal to use a
mixture of real table names and aliases as qualifiers. This takes in
WHERE criteria (which is what a Filter resolves to) as well as
ordering and grouping criteria (and also .* specs!)

What you will need to do here (and anywhere else where you have SQL
involving multi-table sets) is fix up the SQL of the dataset. Having
done that, you will then need to go to the Filter spec and change it
to (for example)

Filter := 'Sales.SALE_TIME < ''11:59:59.000''';

or, if you are using aliases in the SQL and you have Sales aliased as S:

Filter := 'S.SALE_TIME < ''11:59:59.000''';

Filters won't be the only field references you will need to look out
for. Masterlinks and Keylinks (for KeySource/Lookup relationships)
will need similar attention. There is a TI sheet at the IBO website
that may provide some clues.

http://www.ibobjects.com/TechInfo.html#ti_migrate47

Helen