我用Sql server2000建了一个数据库,里面有一个表aa,其中有一列是bb,并添加了信息
delphi中建了一个Form,这里面加上adoconnection,adotable,datasoure,dbcombobox
等组件,并设置了相关属性。但dbcombobox中只能显示表aa中bb列的第一个元素,可是这一列有很多信息呀
谢谢大家帮忙
delphi中建了一个Form,这里面加上adoconnection,adotable,datasoure,dbcombobox
等组件,并设置了相关属性。但dbcombobox中只能显示表aa中bb列的第一个元素,可是这一列有很多信息呀
谢谢大家帮忙
在DBCOMBOBOX的ONENTER事件里面写代码
begin
adotable.Open;
while not adotable.Eof do
begin
DBComboBox.Items.Add(adotable.Fieldbyname('bb').AsString);
adotable.Next;
end;
end;