with adoquery1 do
begin
close;
sql.Clear;
sql.Add('select * from varview');
open;
end;
if adoquery1.isempty then
with adoquery1 do
begin
close;
sql.clear;
sql.add('insert into varview (RunSign,ChargingSign,DisChargingSign,OverASign,OverVSign,UnderVSign) values('''+inttostr(f1)+''','''+inttostr(f2)+''','''+inttostr(f3)+''','''+inttostr(f4)+''','''+inttostr(f5)+''','''+inttostr(f6)+'''');
execsql;
end
else
with adoquery1 do
begin
close;
sql.clear;
sql.add('update varview set RunSign='''+inttostr(f1)+''',ChargingSign='''+inttostr(f2)+''',DisChargingSign='''+inttostr(f3)+''',OverASign='''+inttostr(f4)+''',OverVSign='''+inttostr(f5)+''',UnderVSign='''+inttostr(f6)+'''');
execsql;
end;
编译没问题,运行到execsql就报错;