Subject Re: [IBO] TIBOQuery and RecordCount
Author Robert martin

Thanks for your detailed and informative reply Daniel.

I can easily work around this problem for now.

Rob Martin
Software Engineer

phone 03 377 0495
fax 03 377 0496
----- Original Message -----
From: Daniel Rail
Sent: Wednesday, July 21, 2004 10:56 PM
Subject: Re: [IBO] TIBOQuery and RecordCount


At July 20, 2004, 19:55, Robert martin wrote:

> I have noticed that with a TIBOQuery the recordcount property
> causes an error (Count of column list and variable list do not
> match) when the source SQL contains a UNION. Is this a known error
> or am I doing something wrong?

The Firebird's API doesn't return the number of rows affected by a DML

So, IBO does a SELECT COUNT(*) when doing a record count, if
RecordCountAccurate is True. IBO simply takes the same FROM and
WHERE clauses from your query to perform the SELECT COUNT(*).

So, the question becomes: How can you do a SELECT COUNT(*) when the
query contains one or more UNION?

The only way this would be possible is by doing the following:
SELECT COUNT(*) FROM (SubQuery containing UNION)
This isn't possible with the current versions of Firebird, but it will
be possible with FB 2.0.

Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (
ACCRA Med Software Inc. (

IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________ - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Yahoo! Groups Sponsor

Yahoo! Groups Links

a.. To visit your group on the web, go to:

b.. To unsubscribe from this group, send an email to:

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

[Non-text portions of this message have been removed]