我设置了DBCombobox的DataSet和DataField,为什么窗口显示后DBCombobox却没有数据显示?
解决方案 »
- TrewView控件的HideSelection属性没效果?
- 三层之.中间层方法的使用!怎么在客户端传输SQL语句到服务端后返回查询的信息回来客户端?
- Dll中使用Application.FindComponent
- 请各位帮助?
- 什么方法可使 DBGrid控件 指针自动下移一位
- 怎样判断文件中的行号,
- 请问在TreeView中插入结点的问题?
- 如何在dbgrid控件中加背景图?
- 代码实验室的问题比较有深度,高手们去看看。来者有份
- listview中Tlistitem和TlistColumn能否相互赋值?
- 如何实现界面和数据库的独立,是不是将业务规则在Datamodule中实现就可以了
- 不用BDE直接链access库发布时出错,如何解决?好头疼!
如ADOTable1的Active为True
设置ListSource和KeyField就可以了
例:
with query1 do
begin
close;
sql.text:='select * from table1';
open;
first;
PreValue:='null'
while not eof do
begin
CurValue:=FieldByName('field1').asstring;
if CurValue<>PreValue then
dbcombox1.item.add(FieldByName('field1').assstring);
PreValue:=CurValue;
next;
end;
end;