adoq1.Close;
adoq1.SQL.Clear;
adoq1.SQL.Add('select * from zhongyang');
adoq1.Open;
if adoq1.RecordCount>0 then adoq1.Recordset.MoveFirst;
for i:=1 to adoq1.RecordCount do
begin
combobox1.Items.Add(adoq1.Fields[1].value);
adoq1.Recordset.MoveNext;
end;
adoq1.Close;上面的代码有问题吗?为什么在combobox1中添加的都是第一条记录的值呢?
请大家帮帮忙呀!!!!!小弟先感谢!!!!!
adoq1.SQL.Clear;
adoq1.SQL.Add('select * from zhongyang');
adoq1.Open;
if adoq1.RecordCount>0 then adoq1.Recordset.MoveFirst;
for i:=1 to adoq1.RecordCount do
begin
combobox1.Items.Add(adoq1.Fields[1].value);
adoq1.Recordset.MoveNext;
end;
adoq1.Close;上面的代码有问题吗?为什么在combobox1中添加的都是第一条记录的值呢?
请大家帮帮忙呀!!!!!小弟先感谢!!!!!
begin
first;
for i:=1 to adoq1.RecordCount do
begin
combobox1.Items.Add(adoq1.Fields[1].value);
end;
next;
end;給分
combobox1.items.clean;
with adoq1 do
SQL.Clear;
SQL.Add('select distinct /*字段*/ from zhongyang');
Open;
if not eof then
begin
combobox1.items.add(adoqu1.fieldbyname('字段').asstring);
end;
next;
end;
end;
rs.open "select * from ------"
rs.movefrist
.
.
.
.
rs.movenext
.
.
.
aps中的ado和delphi中的ado是两个概念哈