Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dbcombobox question 1

Status
Not open for further replies.

pierrotsc

Programmer
Nov 25, 2007
358
US
I am not sure if i understand on how this component works. i have a database with 2 records. i have a dbcombobox and have the datasource and datafield populated. when i run the program, the first record is showing. when i click on the down arrow to see the list of records available (i assume 2), nothing shows up. i only see my first record. what is the purpose of dbcombobox if it does not show all the records from a datafield?
thanks for any explanation. i think i may be confused.
p
 
Don't forget about Google ;-)




I like the description from the first link:
DBComboBox gives you the current record, but you can have a pick list of possible values for the user to choose from. If you want you can prevent the user from adding anything that is not in the drop-down list.

DBLookUp is the same, but the list of choices is derived from another database, rather than added either at design time or in the program.


Russell Crosser
rcrosser@netlink.com.au
 
yep, i realized that after i posted and did look at the above posts. I am working on trying to populate it with a sql command. You would think that a dbcombobox with a drop down list, would do that automatically !!

Thanks for the fast feedback.. Appreciate it.
 
There's no reason in my mind to populate dbcombobox automatically. Basically the value that shows comes from DataSource and DataField. But the possible values for that field could come from an SQL query, a pre-determined lookup table in the database, or a hard-coded list of strings (at design- or run-time). Some things that are automatic are good, while others aren't so much. If you do need to populate it with the results of an SQL query, don't use TDBComboBox, but TDBLookupCombo.

GIS Programmer
City of Orem, UT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top