• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 426
  • Last Modified:

ADOTable + DBLook

What is the diference between DBLookUpComboBox and DBComboBox ?
I have a ADOTable
how can i add dinstinct values from the adotable in one of this below (DBLookUpComboBox and DBComboBox)
Thanks
0
tinti
Asked:
tinti
1 Solution
 
marcoszorrillaCommented:
Basically a DbCombobox has only DataField and DataSource it can sho data from a Table.

But DblookUpCombobox has a DaTasource and a ListSource its say you can show values from a table and save in anohter table the DataSource.

Best Regards.
Marcos.
0
 
tintiAuthor Commented:
But  a little source code if is possible
Thanks
0
 
kretzschmarCommented:
a dbcombobox inserts the selected item as is in teh databasefield

a dblookupcombobox inserts the keyfield of the selected item from the lookuptable in the databasefield

any source you don't have, because usual all is adjusted at designtime -> no code needed

a sample configuration for the dblookupcombo

lets have a salut-table (two fields)

Salut_ID Salut_Text
1 Mister
2 Misstress
3 Miss
....

and a adresstable like

Adress_ID Salut_ID Name ...
1 1 Kretzschmar
...

now you can define for the Field Salut_ID from adress a lookup
to the saluttable

the property-entries in the dblookupcombobox are

Datasource -> TDatasource linked to the Adress-Dataset
DataField -> Field Salut_ID from Adress
KeyField -> Field Salut_ID from Table Salut
ListSource -> TDatasource linked to the Salut-Dataset
ListField -> Field Salut_Text from Salut

meikl ;-)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now