怎样把一个表的某个字段的内容加到TComboBox的item中? 如题,怎样把一个表的某个字段的内容加到TComboBox的item中? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 combobox1.items.clear;with adoquery1 dobegin open; first; while not eof do begin combobox1.items.add(fieldbyname('field').asstring); next; end;end; while not table1.eof dobegincomobobox1.items.add(table1.fieldbyname('fieldname').asstring);table1.next;end combobox1.items.clear;with adoquery1 dobegin open; first; while not eof do begin combobox1.items.add(fieldbyname('field').asstring); next; end;end; 升级散分 sos(在线等待) 多个同类控件事件之间代码如何共享? 如何返回dbgrid中可显示的行数? delphi和SQL Server的问题.... 瞅瞅我的代码在哪里出现问题了?? 算式字符串有效性检查 关于DELPHI6中的COM+更新问题 两台机器都是WINDWOS98,通过网卡和HUB连接了,设置了各自的IP和子网掩码,为什么无法访问对方? 请问,LISTVIEW的ITEM中如何加下拉框? 为什么我的delphi 7 没有QReport组件? 谁能给我一个主/细关系表的例子?高分相赠!!!!!!!!
with adoquery1 do
begin
open;
first;
while not eof do
begin
combobox1.items.add(fieldbyname('field').asstring);
next;
end;
end;
begin
comobobox1.items.add(table1.fieldbyname('fieldname').asstring);
table1.next;
end
with adoquery1 do
begin
open;
first;
while not eof do
begin
combobox1.items.add(fieldbyname('field').asstring);
next;
end;
end;