Subject Re: [IBO] Re: Special characters on TIB_Query SQL property
Author Helen Borrie
At 01:14 AM 8/04/2006, you wrote:
>OK, I've changed Connection Charset to WIN1252 and now transliterate
>error has gone away.
>But still persists another problem. There is a difference between
>setting TIB_Query SQL property or TIB_Query Filter property.
>If I set TIB_Query SQL property to
> ... WHERE descr like '%inclusão%'
>it works properly and I get records I want from DataSet.
>But, if I set TIB_Query Filter property to
> descr like '%inclusão%'
>it returns nothing from DataSet (FilterOptions=[fopCaseInsensitive]).
>What's wrong?

LIKE is an "exact match" search. By setting the
filter to fopCaseInsensitive, you cause the WHERE clause to be

WHERE descr like '%INCLUSAO%'.

(Drop a monitor into your form to look at the query that goes across the wire).

Remove the fopCaseInsensitive attribute and use
CONTAINING instead. CONTAINING will match either
upper or lower case, *provided* there is an
appropriate COLLATE attribute on the searched column.

However, be aware that you will always get wrong
results if you attempt to do a case-insensitive
search on a database column that does not have the correct collation attribute.