Solved

ADOTable + DBLook

Posted on 2003-11-03
3
420 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
ID: 9671228
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
ID: 9671401
But  a little source code if is possible
Thanks
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 60 total points
ID: 9677141
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

813 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

16 Experts available now in Live!

Get 1:1 Help Now