Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Filtering questions
Wed, Oct 10 2007 5:04 AMPermanent Link

"Harry de Boer"
LS

sessiontype=stRemote

1) If I first apply a filter to a TEDBTable component and set filtered =
true and then opening that EDBtable; will it only fetch the filtered rows or
will it open the table first and then fetch the rows?

2) The same for a TEDBQuery: will it execute (open) the query first and then
apply the filter, or will it take the filter in consideration when opening
the query?

3) How do views behave in this matter, like a table or a query?

4) Is there a difference between local and remote regarding this?

The reason for this questions is that we want to let endusers use a 'visual
filter' component with which a user can apply filters on the fly. We want
however to apply a filter before opening a table/query to have no records to
start with (custID=0). If the visual filter filtertext = '' we then in the
onchange event want to set the original filter back, so that the enduser
never retrieves all the data.

Regards, Harry .





Wed, Oct 10 2007 8:50 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Harry,

<< 1) If I first apply a filter to a TEDBTable component and set filtered =
true and then opening that EDBtable; will it only fetch the filtered rows or
will it open the table first and then fetch the rows? >>

It will open the table first, fetch some rows, filter the table, and then
fetch some rows again.

<< 2) The same for a TEDBQuery: will it execute (open) the query first and
then apply the filter, or will it take the filter in consideration when
opening the query? >>

Same situation.

<< 3) How do views behave in this matter, like a table or a query? >>

Same situation.

<< 4) Is there a difference between local and remote regarding this? >>

No, nothing apart from the fact that the remote session is thunking the
filtering calls, etc. over the wire.

<< The reason for this questions is that we want to let endusers use a
'visual filter' component with which a user can apply filters on the fly. We
want however to apply a filter before opening a table/query to have no
records to start with (custID=0). If the visual filter filtertext = '' we
then in the onchange event want to set the original filter back, so that the
enduser never retrieves all the data. >>

At the most, EDB will only retrieve the number of rows needed to satisfy any
data-aware controls such as a grid, or only 1 row if there aren't any grids
connected.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Oct 22 2007 5:50 AMPermanent Link

"Harry de Boer"
Tim,

> At the most, EDB will only retrieve the number of rows needed to satisfy
any
> data-aware controls such as a grid, or only 1 row if there aren't any
grids
> connected.

Does that mean you could use the QG from devexpress where you
-open the table (only retrieve the number of VISIBLE rows needed to fill the
first visible (let's say) 25 records of the QG)
-could filter on a name with z* (which is not visible till then) and then
only the records are retrieved that are filtered

Reason for asking this is that I read some posts (fulltextsearch.com) where
people state that you could only use a filter when the whole table is
loaded. Maybe someone uses the QG and could give me some info here (I'm
thinking of buying QG)

Regards, Harry


"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> schreef in bericht
news:74659CDE-55BF-4950-BEB4-7C3B5356D917@news.elevatesoft.com...
> Harry,
>
> << 1) If I first apply a filter to a TEDBTable component and set filtered
=
> true and then opening that EDBtable; will it only fetch the filtered rows
or
> will it open the table first and then fetch the rows? >>
>
> It will open the table first, fetch some rows, filter the table, and then
> fetch some rows again.
>
> << 2) The same for a TEDBQuery: will it execute (open) the query first and
> then apply the filter, or will it take the filter in consideration when
> opening the query? >>
>
> Same situation.
>
> << 3) How do views behave in this matter, like a table or a query? >>
>
> Same situation.
>
> << 4) Is there a difference between local and remote regarding this? >>
>
> No, nothing apart from the fact that the remote session is thunking the
> filtering calls, etc. over the wire.
>
> << The reason for this questions is that we want to let endusers use a
> 'visual filter' component with which a user can apply filters on the fly.
We
> want however to apply a filter before opening a table/query to have no
> records to start with (custID=0). If the visual filter filtertext = '' we
> then in the onchange event want to set the original filter back, so that
the
> enduser never retrieves all the data. >>
>
> At the most, EDB will only retrieve the number of rows needed to satisfy
any
> data-aware controls such as a grid, or only 1 row if there aren't any
grids
> connected.
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>
>

Mon, Oct 22 2007 8:59 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Harry


I don't use QuantumGrid (I've bought the TMS stuff) but don't confuse its internal sorting/filtering system with the connected database. To use the grids internal functions you're almost guaranteed to have to load the entire table.

Roy Lambert
Mon, Oct 22 2007 9:17 AMPermanent Link

Eryk Bottomley
Harry

> Does that mean you could use the QG from devexpress where you
> -open the table (only retrieve the number of VISIBLE rows needed to fill the
> first visible (let's say) 25 records of the QG)
> -could filter on a name with z* (which is not visible till then) and then
> only the records are retrieved that are filtered

Depends if the grid is in 'GridMode' or not (the default is 'not').

> Reason for asking this is that I read some posts (fulltextsearch.com) where
> people state that you could only use a filter when the whole table is
> loaded. Maybe someone uses the QG and could give me some info here (I'm
> thinking of buying QG)

They are referring to the QGrid built in filtering capability which is
not dependent on the underlying database (if any - a QGrid does not need
to be tied to a database at all).

If 'GridMode' is active then the QGrid behaves much like a normal
TDBGrid in terms of requesting records and its own filtering
capabilities are disabled. If 'Gridmode' is not active then all the
records from the attached dataset are downloaded and buffered in memory
which the grid can then filter and sort locally without reference to the
underlying dataset.

Eryk
Image