Subject Re: [IBO] Searching
Author Harald Klomann
Lele Gaifax wrote:
>
> As said, maybe I'm missing something, but that doesn't seem to work!
> I have a breakpoint on that event, and it isn't triggered when I post
> the search... I tried doing the same within the BeforeExecute event
> handler but, AFAICU, the doc is clear: only within PrepareSQL I'm
> allowed to alter SQLWhereItems....
>
> Should I call InvalidateSQL on memo's OnChange?

Lele,

OnPrepareSQL is called, when IBO detects that the Query has to be
prepared again. If you are in SearchMode, and you dont alter any of
your data aware controls (IB_Edit´s,LookupCombo, ...), so there is no
need to prepare the Query again. If your Memo is not a TIB_Memo, but it
is altered within the SearchMode, you have to call InvalidateSQL to notify
IBO that the SQL has to be prepared again. After doing this, OnPrepareSql
will be called !

Harald