Article View: borland.public.cppbuilder.database.ado
Article #1045Re: Records to the Combobox?
From: Viatcheslav V. Vassiliev
Date: Mon, 01 Nov 2004 17:12
Date: Mon, 01 Nov 2004 17:12
33 lines
1743 bytes
1743 bytes
ComboBox1->Items->BeginUpdate();
try
{
ADOQuery1->First();
while (!ADOQuery1->Eof)
{
ComboBox1->Items->Add(ADOQuery1->Fields->Fields[0]->Value );
ADOQuery1->Next();
}
}
__finally
{
ComboBox1->Items->EndUpdate();
}
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Guest" <Guest@aew_nospam.com> ???????/???????? ? ???????? ?????????:
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/)
Technical Details
Message-ID:
<41866e97@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<41863815$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 From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <41863815$1@newsgroups.borland.com> Subject: Re: Records to the Combobox? Date: Mon, 1 Nov 2004 20:12:53 +0300 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 213.234.218.42 Message-ID: <41866e97@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1099329175 213.234.218.42 (1 Nov 2004 09:12:55 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail