FireDAC.Comp.Client.TFDCustomCommand.CommandKind

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

Delphi

property CommandKind: TFDPhysCommandKind read GetCommandKind write SetCommandKind

C++

__property Firedac::Phys::Intf::TFDPhysCommandKind CommandKind = {read=GetCommandKind, write=SetCommandKind, stored=IsCKS, default=0};

プロパティ

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

説明

コマンドの種類を特定します。


CommandKind プロパティでは、CommandText プロパティの内容の種類を特定します。

この値は、Prepare を呼び出す前に明示的に設定することができます。設定しなければ、CommandText の内容を FireDAC が分析して自動的に割り当てます。これを自分で割り当てなければならないのは、ストアド プロシージャの準備をするときだけです。

 //Example 1:
 ADCommand1.CommandKind := skStoredProc;
 ADCommand1.CommandText.Text := 'MY_PROC';
 ADCommand1.Prepare;
 
 //Example 2:
 ADCommand1.CommandText.Text := 'ALTER PROCEDURE MY_PROC COMPILE';
 case ADCommand1.CommandKind of
 skAlter: ShowMessage('Alter command');
 ..........
 else     ShowMessage('Other command');
 end;

関連項目