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 2010-02-03 17:08  万一  阅读(4198)  评论(0编辑  收藏  举报