Subject | Re[2]: [IBO] RecordCount gives strange error |
---|---|
Author | Ramil |
Post date | 2007-01-22T09:43:45Z |
Hello Joe,
Try to use this:
IBOQuery.InternalDataset.FetchAll;
... := IBOQuery.InternalDataset.BufferRowCount;
I have used BufferRowCount in XLSQL Reports.
It is appreciably faster than calculation of RecordCount by other
SQL-query.
--
Best regards,
Ramil R. Khabibullin khabibr@...
Try to use this:
IBOQuery.InternalDataset.FetchAll;
... := IBOQuery.InternalDataset.BufferRowCount;
I have used BufferRowCount in XLSQL Reports.
It is appreciably faster than calculation of RecordCount by other
SQL-query.
--
Best regards,
Ramil R. Khabibullin khabibr@...
>
>
>
>
>
> 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
>>
>