TClientDataSet[16]: 用计算字段显示 UpdateStatus


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

测试图:

TClientDataSet[16]: 用计算字段显示 UpdateStatus

相关代码:

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;


 
   

你可能感兴趣的:(update)