各位大虾看看这段代码,为何设了断点运行程序结果是对的,不设断点,程序结果不对?
lvlay 2003-10-19 06:24:43 datasource1.dataset:=AdoQuery1;
AdoQuery1.Close;
AdoQuery1.SQL.Clear;
AdoQuery1.SQL.Add('select ZH, BJBH, CLMC, SJGG, CZ, CD, ZJSL, XSJS from 中间表 where CLMC="∠" Order by SJGG');
AdoQuery1.Open;
dbgrid1.DataSource:=datasource1;
ListBox1.Clear;
with DataSource1.DataSet do
begin
first;
while not Eof do
begin
tmp:= fields[3].AsString;
if not inlist(tmp) then
ListBox1.Items.Add(tmp) ;
next;
end;
end;
在 ListBox1.Clear;处设了断点运行,结果list框里的内容正确
如果去掉断点,结果list框里没有内容。晕死了
我的平台在98下,可是XP下正常的很。 还有我用的是delphin7