Subject RE: [IBO] How use SearchMask with TIB_LocateEdit
Author Support List
Carlos,

> My question is... is possible use the "TIB_IncSearch" or
> "TIB_LocateEdit" to find a record having only one piece of information?
>
> See the example...
>
> My registration has three people...
>
> 1 Sarah Holmes
> 2 Jonny Bravo
> 3 Peter Gomes
>
> But my research is only from the surname..
>
> With the components mentioned, i see what they can find records based only
> on the beginning of the name with the same effect as "starting with"
> present in SQL, but how to have an effect similar to "containing" noting
> in SQL?

Do you want this to take place in memory? If so, there is a good strategy
for this.

I would recommend that you use an OnFilterRecord event and then based on the
criteria set the filtered flag accordingly.

Once you do this, you then have two choices. You can leave the Filtered
property to false so that all records show up in the dataset and then you
use the FindFirst, FindNext, FindPrev and FindLast methods to navigate among
only those records that meet your filter criteria. You could also set the
Filtered property to true and then only those records that match the filter
criteria would be visible in your dataset, though the other records would
also be in the buffers too.

If your table is very large and you want a more client-server friendly
approach so that you aren't using lots of bandwidth and memory on the
client, then you need to look into using the Full Text Search engine. This
allows you to easily setup a bunch of search word tables, indexes, triggers,
etc. in order to allow you to do word based searches that take advantage of
server-side optimizations.

Look at the IB_FTS application as this is the admin tool for configuring
full text searching as well as testing it out. There is a separate help file
that will guide you through this process. There is also a special control
that works with your search index that you type your search criteria into.
You actually end up with a very Google-like search interface to your data.
You can do phrases, negatives and wildcards.

Hope this helps,
Jason