如何在程序中动态向combobox的items属性中添加数据,使其与数据库中的数据保持一致?items中的数据要不能重复(数据库中可能会重复).
解决方案 »
- 谁可以给一个hook自己进程的API的例子啊,最好是hook winine
- FastReport问题
- delphi6为何我写代码时活动的unit已经变化,而左边的查看类和过程变量等的那个monitor窗口(我说不准具体名称)不随之变化?
- 我在做测试插入数据库中一张表的时候出现错误!!
- 星星高手请进
- 正在做VCL开发的,大家联系
- 关于read()函数
- 哪里有DELPHI6中文版或其中的帮助文件下载?有可靠链接的第一个给分50分以上(QQ:51129127)(无内容)
- 请提供一下建表思路
- delphi 运行程序提示 ‘Access violation at address 004B09BD in module’ Read of address
- 特急!fastreport2.46无法显示TfrReport中的"对象查看器",如何恢复?
- 如何一个一个字节的读取widestring 字符串的asc 码值
begin
active:=false;
active:=true;
if recordcount>0 then
begin
first;
while not eof do
begin
combobox1.items.add(trim(fieldbyname('field').asstring));
next;
end;
combobox1.itemindex:=0;
end;
end;
________________________________
做个调查,关于软件界面
http://expert.csdn.net/Expert/TopicView2.asp?id=1649010
谢谢关注
adoquery1.sql.add('select field1 from table1 group by field1');
with adoquery1 do
begin
active:=true;
if recordcount>0 then
begin
first;
repeat
combobox1.items.add(adoquery1field1.asstring);
next;
until eof ;
combobox1.itemindex:=0;
end;
end;
var i,j:integer;
begin
j:=table1.recordcont;
for i:=0 to j-1 do
table1.moveby(i);
combobox1.items.add(table1.fieldbyname('field'));//field为数据库中的某字段
end;我就这样添加combobox的items的值,也挺好用的.
begin
j:=table1.recordcont;
for i:=0 to j-1 do
begin
table1.moveby(i);
combobox1.items.add(table1.fieldbyname('field'));//field为数据库中的某字段
end;
end;