Subject Re: [IBO] TIBOQuery : Filtering records without refreshing
Author scr0546
--- In IBObjects@yahoogroups.com, Daniel Rail <daniel@...> wrote:
>
> Hi,
>
> At Wednesday, November 26, 2008, 1:25 AM, Hans wrote:
>
> > Not possible to sub-filter in TIBOQUERY
>
> It is possible. But, not with the Filter property. You have to
use
> the OnFilterRecord event, and have the Filtered property set to
True.

I've tried this before, but this is very,very slow ...
("pos(searchstr,fieldbyname('name').AsString)>0")

>
> > Maybe create a Temporary DataSet using the first filter
> > and then sub-filter this Tempory Dataset in TIBOQUERY

Yes I have implemented it this way now.
One dataset with all records, one for the filtered query.

> > Or receive the first filter results in a TMemoryDataset
> > and basically do the same
>
> And, that would be another option. Load all the data into a memory
> dataset and use its Filter property.

I've tried this, but it takes a lot of time to copy all records
into TClientdata / kbmMemTable at startup.

> But, if it's a multi-user application, neither of these methods
would
> permit to fetch new data from the database, unless the user has a
> button that would force a refresh of the dataset.

yes, I know. A refresh-button is in the dialog.

> --
> Best regards,
> Daniel Rail
> Senior Software Developer
> ACCRA Solutions Inc. (www.accra.ca)
> ACCRA Med Software Inc. (www.filopto.com)
>

Thanks for help.
Maybe I will cancel the dataset with all records.
So the user can only search for records and has no view to all data.
I think it's time for this, because the recordcount increased from a
few hundert to 30.000 customersrecords.

Best regards,
Joe