Solved

ADOTable + DBLook

Posted on 2003-11-03
3
418 Views
Last Modified: 2010-04-05
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
Comment
Question by:tinti
3 Comments
 
LVL 3

Expert Comment

by:marcoszorrilla
Comment Utility
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
 

Author Comment

by:tinti
Comment Utility
But  a little source code if is possible
Thanks
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 60 total points
Comment Utility
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now