🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
5 messages
5 total messages Started by Sandi Wijaya Wed, 07 Mar 2001 02:44
Accessing Query result ("SELECT count(*) ...")
#5670
Author: Sandi Wijaya
Date: Wed, 07 Mar 2001 02:44
15 lines
1322 bytes
Hi, everyone

I want to ask, about accessing the result of SQL statement in Query object.
SQL statement is :
"SELECT count(*) FROM pub.trade_acct"

the result should be an integer in to a one record and one field, right. I
tried to access with :
AnsiString x = DM_MaintChqType->Q_tradeacct->Fields->Fields[0]->AsString;

but it's returning an exception error message that said "list is out of
bound".

How can I access the result ?
Thank you in advance.
Re: Accessing Query result ("SELECT count(*) ...")
#5674
Author: Neo
Date: Wed, 07 Mar 2001 15:39
28 lines
1473 bytes
Are you adding the SQL to the query and executing it?


Sandi Wijaya <sandiwijaya@yahoo.com> wrote in message
news:3aa5a085_1@dnews...
> Hi, everyone
>
> I want to ask, about accessing the result of SQL statement in Query
object.
> SQL statement is :
> "SELECT count(*) FROM pub.trade_acct"
>
> the result should be an integer in to a one record and one field, right. I
> tried to access with :
> AnsiString x = DM_MaintChqType->Q_tradeacct->Fields->Fields[0]->AsString;
>
> but it's returning an exception error message that said "list is out of
> bound".
>
> How can I access the result ?
>
> Thank you in advance.
>
>
>
>
>
>
Re: Accessing Query result ("SELECT count(*) ...")
#5677
Author: Sandi Wijaya
Date: Thu, 08 Mar 2001 01:14
7 lines
1276 bytes
of course, there is another way to do that ? (executing SQL statement
without using Query component )

"Neo" <klink_stalag13@nospam_yahoo.com> wrote in message
news:3aa65717$1_1@dnews...
> Are you adding the SQL to the query and executing it?
>
Re: Accessing Query result ("SELECT count(*) ...")
#5678
Author: Sandi Wijaya
Date: Thu, 08 Mar 2001 01:14
7 lines
1184 bytes
of course, there is another way to do that ? (executing SQL statement
without using Query component )

"Neo" <klink_stalag13@nospam_yahoo.com> wrote in message
news:3aa65717$1_1@dnews...
> Are you adding the SQL to the query and executing it?
>
Re: Accessing Query result ("SELECT count(*) ...")
#5679
Author: Chokchai Songjareanzup
Date: Thu, 08 Mar 2001 08:15
31 lines
1607 bytes
Try this,
"SELECT count(*) AS CNT FROM pub.trade_acct"
AnsiString x = DM_MainChqType->Q_tradeacct->FieldByName("CNT")->AsString;

Chokchai

"Sandi Wijaya" <sandiwijaya@yahoo.com> wrote in message
news:3aa5a085_1@dnews...
> Hi, everyone
>
> I want to ask, about accessing the result of SQL statement in Query
object.
> SQL statement is :
> "SELECT count(*) FROM pub.trade_acct"
>
> the result should be an integer in to a one record and one field, right. I
> tried to access with :
> AnsiString x = DM_MaintChqType->Q_tradeacct->Fields->Fields[0]->AsString;
>
> but it's returning an exception error message that said "list is out of
> bound".
>
> How can I access the result ?
>
> Thank you in advance.
>
>
>
>
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads