随笔 - 2146  文章 - 19 评论 - 11846 阅读 - 1266万


TClientDataSet.UpdateStatus: TUpdateStatus;
TUpdateStatus = (usUnmodified, usModified, usInserted, usDeleted);

测试图:



相关代码:
uses TypInfo;

procedure TForm1.ClientDataSet1CalcFields(DataSet: TDataSet);
begin
  ClientDataSet1.FieldByName('UpdateStatus').AsString :=
    GetEnumName(TypeInfo(TUpdateStatus), Ord(ClientDataSet1.UpdateStatus));
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ClientDataSet1.MergeChangeLog;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  ClientDataSet1.Delete;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  ClientDataSet1.UndoLastChange(True);
end;

posted on   万一  阅读(4229)  评论(0编辑  收藏  举报


点击右上角即可分享
微信分享提示