sorry ,题意没看清,下面的才对
procedure TForm1.PostClick(Sender: TObject);
begin
PostData(1);
end;
procedure TForm1.CancelClick(Sender: TObject);
begin
PostData(2);
end;
procedure TForm1.PostData(I: integer);
begin
if I=1 then AdoQuery1.Post;
if I=2 then AdoQuery1.Cancel;
end;
procedure TForm1.AppendClick(Sender: TObject);
begin
AdoQuery1.Append;
end;