Article View: borland.public.cppbuilder.database.ado
Article #778Re: Records to the Combobox?
From: Daryl
Date: Tue, 12 Apr 2005 21:07
Date: Tue, 12 Apr 2005 21:07
30 lines
1775 bytes
1775 bytes
James Peterson wrote:
> ComboBox1->BeginUpdate();
> ComboBox1->Items->Add(ADOQuery1->Fields->Fields[0]->Value );
> ComboBox1->EndUpdate();
>
> this should work.
>
> "Guest" <Guest@aew_nospam.com> wrote in message
> news:41863815$1@newsgroups.borland.com...
>
>>Hi,
>>
>>This line adds only one row in combobox:
>>ComboBox1->Items->Add(ADOQuery1->Fields->Fields[0]->Value );
>>
>>How can add all records to the combobox?
>>
>>User submitted from AEWNET (http://www.aewnet.com/)
>
>
>
You may have to loop through the recordset generated by the ADOQuery
Example
int pos = 0;
While (!ADOQuery1->Eof) {
ComboBox1->Items->Add(ADOQuery1->Fields->Fields[0]->Value );
pos++;
ADOQuery1->Next();
}
Technical Details
Message-ID:
<425c391d$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41863815$1@newsgroups.borland.com> <4256b3d7$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,17ab27b9c4e85127 X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 13 Apr 2005 07:07:58 +1000 From: Daryl <developeracc@hotmail.com> User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.ado Subject: Re: Records to the Combobox? References: <41863815$1@newsgroups.borland.com> <4256b3d7$1@newsgroups.borland.com> In-Reply-To: <4256b3d7$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 203.103.112.241 Message-ID: <425c391d$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1113340189 203.103.112.241 (12 Apr 2005 14:09:49 -0800) Lines: 30 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail