Subject | Re: [IBO] How to know the size of result set before fetching? |
---|---|
Author | Lester Caine |
Post date | 2005-06-06T19:43:59Z |
Eyal wrote:
you know the total number of records in the answer - in which case
FetchAll would by then have a local copy of the data ;)
This comes back to the simple question - Why do you need to know the
total? The user can't see them all at once, so only the records actually
required for display need to be downloaded. There are a number of ways
of maintaining counts via triggers, so that a full count of records is
not required, and a simple table with count results in it can be
accessed fast to remove the COUNT(*) delay. It's a matter of looking at
the alternatives.
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
> I thought that RowsSelected is supposed to reflect that number of rowsI THINK that is a count of the rows in a multiple select subset of the data.
> in the result set on the server. Apparently it does something else.
> I wonder is there's anything in the IB/FB API that can be used toYou have exactly the same problem here. You have to RUN the query before
> retrieve the number of selected rows before fething.
you know the total number of records in the answer - in which case
FetchAll would by then have a local copy of the data ;)
This comes back to the simple question - Why do you need to know the
total? The user can't see them all at once, so only the records actually
required for display need to be downloaded. There are a number of ways
of maintaining counts via triggers, so that a full count of records is
not required, and a simple table with count results in it can be
accessed fast to remove the COUNT(*) delay. It's a matter of looking at
the alternatives.
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services