Subject RE: FW: [IBO] Filter
Author Jason Wharton
Another improvement in case you did a filter like this:

((XX.CUSTOMER_NAME) LIKE 'HELEN%')

I know this isn't likely to happen but it is still valid syntax that IBO did
not properly handle. When it hits an open parenthesis it was expecting
there to be a name operator and operand not just a name only. Not it will
handle both situations with the change below.

Around line 6260 (after previous patches applied)

AOper := PluckFirstToken( AFilter, false, true );
// add what is below this
if ( AOper = ')' ) and
( WhereClause.Count > 0 ) and
( WhereClause[ WhereClause.Count - 1 ] = '(' ) then
begin
WhereClause.Delete( WhereClause.Count - 1 );
AOper := PluckFirstToken( AFilter, false, true );
end;
// add what is above this
if UpperCase( AOper ) = 'NOT' then
begin

I think I've explored all the areas where the filter processing needed
enhancement to fully open the doors to not just BDE compliant filter strings
but a much wider range of SQL strings as well. The idea before was if you
wanted full SQL syntax that you should preface it with ::SQL:: to disable to
parsing but now it should be more tolerant and not require the prefix.

Let me know if there are any problems with applying these patches.

Thanks,
Jason Wharton