Link to home
Start Free TrialLog in
Avatar of fradolcino
fradolcino

asked on

ADOQuery + ComboBox

I have a ADOQuery and a ComboBox
i give a sql command
select * from stock where price>1000
all the selected fields i want to add in ComboBox
How can i do this ?
Thanks
Avatar of Qosai_DBA
Qosai_DBA
Flag of Palestine, State of image

Hi fradolcino

if I know you can concatenate all fields first like

SELECT field1 || field2 || field3 || ... || ... AS allfields FROM stock WHERE price>1000;

so the result of this Query is only one field and you can add the values to the ComboBox.

Regards
khalid.
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of brunomsilva
brunomsilva

Hi,

why don't you use associate a datasource control with your query and then use it as a datasource for a dbLookupComboBox. Then you just have to set the KeyField propery to the field you want.

bye,
 Bruno