adocommand1.commandtext:='insert wanchengyewu select * from yewu where 条件'; adocommand1.execute; adocommand1.commandtext:='delete yewu where 条件'; adocommand1.execute;
Sql.Text := (用 Sql.Add()加入)insert into wanchengyewu select * from yewu where ... delete from yewu where ... ExecSql
procedure TForm1.Button1Click(Sender: TObject); begin adoquery2.SQL.Add('insert into wanchengyewu select * from yewu where id=1'); adoquery2.ExecSQL; adoquery1.SQL.Add('delete from yewu where id=1'); adoquery1.ExecSQL; end; end.我这么写的,它说我FROM子语句错误
adocommand1.execute;
adocommand1.commandtext:='delete yewu where 条件';
adocommand1.execute;
delete from yewu where ...
ExecSql
begin
adoquery2.SQL.Add('insert into wanchengyewu select * from yewu where id=1');
adoquery2.ExecSQL;
adoquery1.SQL.Add('delete from yewu where id=1');
adoquery1.ExecSQL;
end;
end.我这么写的,它说我FROM子语句错误
http://guanggaoren.com/test/test.exe