简体   繁体   English

TDataSet.Insert 和 TDataSet.Append 有什么区别?

[英]What is the difference between TDataSet.Insert and TDataSet.Append?

These two code samples appear to do the same thing, is there any difference between them in terms of the way the data is added to the database?这两个代码示例似乎做同样的事情,就数据添加到数据库的方式而言,它们之间有什么区别吗?

procedure TForm1.Button1Click(Sender: TObject);
begin
  ADOTable1.Append;
  ADOTable1['Name'] := 'Mike';
  ADOTable1.Post;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ADOTable1.Insert;
  ADOTable1['Name'] := 'Mike';
  ADOTable1.Post;
end;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM