设置数据集的BeforePost及AfterPost处理事件函数就行了。
示例
DataSet1.BeforePost := DoBeforePost;
DataSet1.AfterPost := DoAfterPost;
procedure TForm1.DoBeforePost(DataSet : TDataSet);
begin
ShowMessage('DataSet BeforePost 捕捉');
end;
procedure TForm1.DoAfterPost(DataSet : TDataSet);
begin
ShowMessage('DataSet AfterPost 捕捉');
end;
很简单吧