Re: ADOQuery and combo box


[ Delphi Forum ] [ Delphi Tutorials -- by DelphiLand ]
Posted by Itanium on July 30, 2003 at 03:14:46:

In Reply to: ADOQuery and combo box posted by AMS on July 21, 2003 at 16:38:02:

: My ADOQuery returns a dataset and I would like to use this dataset as the items in a drop down combo box. I cannot figure it out, any help appreciated. Thanks.

my answer :
if u want to add only 1 field . not a look up field , u can add this code to form show or a button .

combo1.clear;
for i := 1 to adoTable.recCount do begin
combo1.item.add(adoTable[field]);
adoTable1.next;
end;
field = field name , in string;
adoTable[field] will return variant value


Related Articles and Replies: