Subject Re: [IBO] RecordCount gives strange error
Author Joe Martinez
I see. I suppose a good solution would be for IBO to split the
queries up, run the count(*) separately on each one, add the results
together, and return that.

BTW, the reason that I use RecordCount is so that I can display an
accurate progress bar when generating a report based on the results of
the query.

-Joe

> You're asking the Fb/IB engine to do something it can't do - in this
> case, to perform select count(*) on a unioned set.
>
> Recordcount belongs to Paradox. There is rarely, if ever, a good
> reason to use it with Fb/IB. For those who insist anyway,
> TIBODataset's inherited RecordCount property resolves to a private
> property RecordCountAll, whose read function constructs a select
> count(*) query based on the set that was specified in the SQL
> property. And of course, select count(*) isn't valid for a union.
>
> Helen
>