Data.Win.ADODB.TADOConnection.Commands

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

Delphi

property Commands[Index: Integer]: TADOCommand read GetCommand;

C++

__property TADOCommand* Commands[int Index] = {read=GetCommand};

プロパティ

種類 可視性 ソース ユニット
property public
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Data.Win.ADODB TADOConnection

説明

接続コンポーネントのすべてのアクティブなコマンドをリスト表示します。

Commands プロパティを使用すると,接続コンポーネントと関連付けられているアクティブなコマンドコンポーネントにアクセスできます。アクティブなコマンドコンポーネントとは,現在開いているコマンドコンポーネントのことです。

ADO 接続オブジェクトを介して接続されるコマンドは,CommandCount に基づくループの中で Commands プロパティを介して順番にアクセスできます。たとえば,TADOConnection コンポーネントの ADOConnection1 を介して接続されるすべての TADOCommand コンポーネントを実行するには次のようにします。



var
i: Integer;
begin
for i := 0 to (ADOConnection1.CommandCount - 1) do
ADOConnection1.Commands[i].Execute;
end;



for (int i = 0; i < ADOConnection1->CommandCount; i++)
ADOConnection1->Commands[i]->Execute();



関連項目