FireDAC.Comp.Client.TFDCustomCommand.AfterExecute

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

property AfterExecute: TNotifyEvent read FAfterExecute write FAfterExecute;

C++

__property System::Classes::TNotifyEvent AfterExecute = {read=FAfterExecute, write=FAfterExecute};

プロパティ

種類 可視性 ソース ユニット
event public
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
FireDAC.Comp.Client TFDCustomCommand


説明

このイベントは、コマンドが実行された後に発生します。

AfterExecute イベントは、Execute メソッドを呼び出すことによりコマンドが実行されると発生します。

procedure TForm1.ADCommand1AfterExecute(ASender: TObject);
begin
if ADCommand1.RowsAffected = -1 then
StatusBar1.SimpleText := 'Ok'
else
case ADCommand1.CommandKind of
skDelete: StatusBar1.SimpleText := Format('%d rows deleted', [ADCommand1.RowsAffected]);
skInsert: StatusBar1.SimpleText := Format('%d rows inserted', [ADCommand1.RowsAffected]);
skUpdate: StatusBar1.SimpleText := Format('%d rows updated', [ADCommand1.RowsAffected]);
else StatusBar1.SimpleText := Format('%d rows affected', [ADCommand1.RowsAffected]);
end;
end;

関連項目