Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread RANGE and RecordCount
Mon, Sep 15 2008 7:07 AMPermanent Link

Heiko Knuettel
Hi !

I want to display data in grid in a "Displaying Record 1 to 100 of 23274" fashion. Is
there a way to determine the total record count without having to execute the query twice
(one time with, and one time without range clause) ?

Heiko
Mon, Sep 15 2008 10:13 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Heiko,

<< I want to display data in grid in a "Displaying Record 1 to 100 of 23274"
fashion. Is there a way to determine the total record count without having
to execute the query twice (one time with, and one time without range
clause) ? >>

I would just execute a SELECT Count() query to get the total.  It will work
as well as anything and is very fast.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Sep 15 2008 10:54 AMPermanent Link

Heiko Knuettel
Tim,

Thanks !

Maybe, only if the total record count is a byproduct of the range-query execution, you
could consider adding some read-only properties (RangeFrom, RangeTo, TotalRecordCount) to
TEDBQuery ?

With ranged queries beeing executed so fast, I think I'm gonna use this display scenario
very often, and I'm looking for the minimum-required-code way.

Heiko
Thu, Sep 18 2008 11:26 AMPermanent Link

Heiko Knuettel
Tim,

I think I found a bug when using a WHERE clause and RANGE.

Example: table has 2000 rows, filtered 400 Rows, and I set a range from 1 to 100. Now I am
not seeing 100 records, but e.g. only 15 records...I think those, who match the filter
criteria in the first 100 records of the unfiltered table.

Heiko
Fri, Sep 19 2008 6:40 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Heiko,

<< I think I found a bug when using a WHERE clause and RANGE.

Example: table has 2000 rows, filtered 400 Rows, and I set a range from 1
to 100. Now I am not seeing 100 records, but e.g. only 15 records...I think
those, who match the filter criteria in the first 100 records of the
unfiltered table. >>

I'll check it out and see what I can find.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image