API:FireDAC.Comp.Client.TFDCommand.AfterExecute

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

Delphi

property AfterExecute: TNotifyEvent read FAfterExecute write FAfterExecute;

C++

__property AfterExecute;

プロパティ

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

説明

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

FireDAC.Comp.Client.TFDCommand.AfterExecute は FireDAC.Comp.Client.TFDCustomCommand.AfterExecute を継承しています。以下の内容はすべて FireDAC.Comp.Client.TFDCustomCommand.AfterExecute を参照しています。

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

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;

関連項目