Subject Re: [IBO] Adding OR condition to where clause
Author Andreas Pohl
Geoff,

thanks for your reply. Actually I'm doing this. I intercept search mode of
calling query, show my own search form and apply serversql string to my
calling query. This is working fine and it is no problem to handle seach
criterias with special stringlist.

But I use generic code to parse filter conditions from search criteria in a
human readable manner (for displaying and printing). So I would be happy for
a "clean" solution. So simply adding a real OR condition (AddSqlWhereOR)
would throw away my special handlings of this situation, isn't?

Mit freundlichem Gruss & Best Regards

Andreas Pohl
apohl@...
www.ibp-consult.com

> I am not certain, but you could try attaching code to the OnPrepareSQL
> handler of the edit control. Use the SearchBuffer property to build
> your own where condition and clear the SearchBuffer so that IBO will
> not also build with it.
>
> If you want the searchbuffer restored when returning to search mode I
> guess you will have to store the value somewhere and restore if using
> code attached to OnStateChanged for the datasource.
>
> (Note: I have not tried anything like this, so no guarantees :-)
>
> Alternatively you could build your own TIB_Edit derivative - which
> gives you much more flexibility and power in handling the search
> criteria.