Subject Re: [IBO] How to know the size of result set before fetching?
Author Lester Caine
Eyal wrote:

> I thought that RowsSelected is supposed to reflect that number of rows
> in the result set on the server. Apparently it does something else.
I THINK that is a count of the rows in a multiple select subset of the data.

> I wonder is there's anything in the IB/FB API that can be used to
> retrieve the number of selected rows before fething.
You have exactly the same problem here. You have to RUN the query before
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