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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
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.