🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #2243

Re: ADO SQL functions

#2243
From: Harold Howe [TeamB]
Date: Fri, 12 Sep 2003 01:49
16 lines
1423 bytes
Lee wrote:

> I am attempting to add all the values in a row from column 2 to what ever is
> left.  

You want to loop on the Fields property. Navigate to the row that you 
care about, and then loop from 2 to dataset->FieldCount;

int total = 0;
int count = ds->FieldCount;
for(int i=0; i<count; ++i)
{
    total += ds->Fields->Fields[i]->AsInteger;
}

h^2
Technical Details
Message-ID: <3f6125dc$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3f56c77b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,9de72cdacf046d89
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-09-11 18:51:21 PST
Date: Thu, 11 Sep 2003 20:49:31 -0500
From: "Harold Howe [TeamB]" <hhowe@bcbdev.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030901 Thunderbird/0.2
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: ADO SQL functions
References: <3f56c77b$1@newsgroups.borland.com>
In-Reply-To: <3f56c77b$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 12.205.145.46
Message-ID: <3f6125dc$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1063331292 12.205.145.46 (11 Sep 2003 18:48:12 -0700)
Lines: 17
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail