Subject Re: [IBO] IB_Query.Filter and Filtered
Author Jason Wharton
IBO parses the Filter into a new SQL.
If you want to do filtering on the client then you need to use the
OnFilterRecord event and put your filtering logic there.
You must use IBO 4 or greater for this functionality.
There is also a RefreshFiltered method (or something spelled similar) that
will do a refresh of filtered records but not fetch any records from the
server again.

HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com

-- We may not have it all together --
-- But together we have it all --


----- Original Message -----
From: "Ales Kahanek" <ales.kahanek@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, February 04, 2003 8:36 AM
Subject: RE: [IBO] IB_Query.Filter and Filtered


> I set the
> IB_Query.AutoFetchAll := true;
>
> so I suppose all records are fetched. The result set has about 500
records,
> but the filter is changed pretty often and I would avoid issuing the
filter
> SQL on the slow line. I would prefer to open the query once and then only
> change the filter on the client.
>
> Ales
>
> > -----Original Message-----
> > From: Daniel Rail [mailto:daniel@...]
> > Sent: Tuesday, February 04, 2003 4:22 PM
> > To: IBObjects@yahoogroups.com
> > Subject: Re: [IBO] IB_Query.Filter and Filtered
> >
> >
> > Hi,
> >
> > > Hi,
> > > suppose, there is IB_Query, opened and all records are
> > fetched. Now assign
> > > the
> >
> > Are you sure that all the records are fetched. Usually after
> > IB_Query.Open, not all records are fetched from the server. The BDE
> > fetches all of the records and stores them in its buffer, but not
> > IBO(in some cases it might be possible, but I don't know the logic
> > behind that code).
> >
> > Out of curiosity, how long does it take to open your query? And, how
> > many records are in the result set?
> >
> > > IB_Query.Filter := 'some filter';
> > > IB_Query.Filtered := true;
> >
> > > and every time you do this an SQL 'SELECT ....' is issued
> > against the
> > > database. I supposed that this filtering is done on the client...
> >
> > This is because it can happen that not all records are in the IBO
> > local buffers. So, in order to actually satisfy the filter, another
> > SELECT has to be performed with the filter appended to the WHERE
> > clause.
> >
> > > Is there any way to filter records on the client simply and
> > quickly? I do
> > > not want to issue extra SQL queries on the slow internet line.
> >
> > Load you data in memory tables in the client application.
> >
> > Daniel Rail
> > Senior System Engineer
> > ACCRA Group Inc. (www.accra.ca)
> > ACCRA Med Software Inc. (www.accramed.ca)