ComboBox1.Items.Clear;with Table1 do
begin
First;
while not Eof do
begin
ComboBox1.Items.Add(FieldByName('code').AsString));
Next;
end;
end;
begin
First;
while not Eof do
begin
ComboBox1.Items.Add(FieldByName('code').AsString));
Next;
end;
end;
ComboBox1.Items.Add(FieldByName('code').AsString);看不出来值100分,这段代码今天出现好几次了!
我用query的时候写的代码和你的一样
可是不知道怎么回事老是通不过
郁闷阿
如果是三层的就复杂一点
如果是两层的,
ComboBox1.Items.Add(FieldByName('code').AsString));
应该符合要求。
我重新启动了一下delphi
begin
if active=false then open;
First;
repeat
ComboBox1.Items.Add(FieldByName('code').AsString));
Next;
until eof;
close;
end;