Capability Not supported.....why not?

the following sql :

select *  from GLACCOUNTOVERRIDE
            where UsebyName = :name and
                       PayEntity = :payentity and
                       TaxType = :taxtype and
                       StateID in ("" ,:stateid) and
                       FilingEntity in ( "" ,:filingentity ) and
                       datediff(dd, getdate(),ExpirationDate) > 0

when it is added into a Tquery and opened, produces the error message
"Capability Not Supported".

This is a BDE error is it not?

This sql should be passing right through to my Sybase backend, which
should easily handle it.

I set SQLQueryMode=SERVER in my TDatabase to try and make sure it
wasn;t trying to interpret the sql locally, but I am still getting the
same error.

Has anyone else run into this situation?

Any help would be very much appreciated!

amat...@radix.net.