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

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
web www.chreos.com
----- Original Message -----
From: Daniel Rail
To: IBObjects@yahoogroups.com
Sent: Wednesday, July 21, 2004 10:56 PM
Subject: Re: [IBO] TIBOQuery and RecordCount


Hi,

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
statement.

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. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)



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


Yahoo! Groups Sponsor
ADVERTISEMENT





------------------------------------------------------------------------------
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/IBObjects/

b.. To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com

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



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