Solved

DBComboBox? what the heck

Posted on 1998-12-18
3
212 Views
Last Modified: 2010-04-04
Ok heres the deal:
Im pulling one field from a table using a SQL component, of course i get a number of records (just a few, about 10).

My problem is that i want those records to be in a dbcombobox. I can get the first record of the query to display fine, but when i pull it down... nothing where are the other records?

How do i take the results of a query and place them in the items property of the combobox?????
0
Comment
Question by:joesmith69
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
Oli2 earned 50 total points
ID: 1351849
How about this:

Query.First
for n := 0 to Query.RecordCount -1 do
begin
 dbComboBox.Items.Add ( Query.FieldByName ( 'xxx' ).AsString;
 Query.Next;
end;

xxx = The Name of the Field of which you want to display the Records.

You don't really need a dbComboBox for this. A normal ComboBox is good enough.
0
 

Author Comment

by:joesmith69
ID: 1351850
Thanks Oli2.
 It worked like a champ using either a normal or db combobox.

 I dont suppose you could tell me what the point of a dbcombobox is (appearantly its not for what i thought it was).
0
 
LVL 1

Expert Comment

by:Oli2
ID: 1351851
hey, joesmith69,
well, I guess the point of a dbcombobox is... errrrr...hmmmm.
Seriously : A DBComponent has a straight connection to the Database.
At some Components this looks very meaningful to me.
At some others (DBComboBox f.E.) I don't really get the clue either.

Greetings, Oli
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question