比如: with DM.ADOTempQuery do begin close; sql.clear; sql.add('delete from BoardInfo where NetCellID='+IntToStr(NetCellID)); ExecSQL; end; with DM.ADOTempQuery do begin close; sql.clear; sql.add('select * from BroadPosition where NetCellID='+IntToStr(NetcellID) +' and BroadID<>255'); Open; end;
begin
CLose ;
SQL.Clear ;
............
end ;
adoquery1.close;
adoquery1.sql.clear;
adoquery1.sql.text :=
adoquery1.open或者adoquery1.execsql请升级你的ado
升级包可以在CSDN上下载到
with DM.ADOTempQuery do begin
close;
sql.clear;
sql.add('delete from BoardInfo where NetCellID='+IntToStr(NetCellID));
ExecSQL;
end; with DM.ADOTempQuery do begin
close;
sql.clear;
sql.add('select * from BroadPosition where NetCellID='+IntToStr(NetcellID)
+' and BroadID<>255');
Open;
end;