Gossamer Forum
Home : General : Databases and SQL :

SELECT COUNT return values

Quote Reply
SELECT COUNT return values
Hi,
Could anyone help me with this problem...
SELECT COUNT (*) AS OutputTotal from atable.
How do I access the OutputTotal value? Im using C++ builder.
TIA!
Kris
Quote Reply
Re: [Kris24] SELECT COUNT return values In reply to
Not sure the syntax that you use in C++, but you would simply call that alias in your output section of the script.

Example, in ASP: %OutputTotal%, ColdFusion: #QueryName.OutputTotal#

You'd have to use the C++ correct syntax for outputting that column alias.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] SELECT COUNT return values In reply to
Cheers for reply Stealth, got it now. If anyone is interested syntax is :
OutputNo=IBQuery->FieldByName("OutputNo")->AsInteger;

Thanks again
Kris