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;