|Re: [IBO] Adding OR condition to where clause
> Here is IBO too smart for my needs :)What you need to do is to use SQLWhereItems or SQLWhereHigh/Med/Low in
the OnPrepareSQL event handler. (nb. SQLWhereItems are the same
stringlist as SQLWhereMed). These strings are only valid during that
phase and are not saved for future prepares.
When you use the AddSQLWhereClause function you are adding permanently
to the SQL statement - so if you call this function with every prepare
you will get duplicate entries, as you have found.