主题:Tadoquery数据库查询后占用内存不释放
tmpado:=tadoquery.Create(nil);
tmpado.ConnectionString:='Provider=MSDASQL.1;Persist Security Info=False;User ID=workterm;Data Source=bf;Mode=Read';
s1:=MDateToStr(PrintDate.Date,1);//日期1
s2:=MDateToStr(PrintDate.Date+1,1);//日期2
with tmpado do
try
Close;
SQL.Clear;
SQL.Add('Select * From 公司');
SQL.Add('where 日期='''+s1+'''');
SQL.Add('And (时间='''+'00:00:00'+'''');
SQL.Add('Or 时间='''+'00:00:01'+''''+')');
Open;
while not eof do
begin
Aupp1:=FieldByName('累积').AsFloat;
Next;
end;
finall
Free;
end;
end;
查询'公司'数据表单后,为什么不能释放询'公司'数据表单所占内存.如果查询数据表单过多会占大量内存不能释放?谢谢指教
tmpado.ConnectionString:='Provider=MSDASQL.1;Persist Security Info=False;User ID=workterm;Data Source=bf;Mode=Read';
s1:=MDateToStr(PrintDate.Date,1);//日期1
s2:=MDateToStr(PrintDate.Date+1,1);//日期2
with tmpado do
try
Close;
SQL.Clear;
SQL.Add('Select * From 公司');
SQL.Add('where 日期='''+s1+'''');
SQL.Add('And (时间='''+'00:00:00'+'''');
SQL.Add('Or 时间='''+'00:00:01'+''''+')');
Open;
while not eof do
begin
Aupp1:=FieldByName('累积').AsFloat;
Next;
end;
finall
Free;
end;
end;
查询'公司'数据表单后,为什么不能释放询'公司'数据表单所占内存.如果查询数据表单过多会占大量内存不能释放?谢谢指教