Data.Win.ADODB.TADOConnection.Commands
Delphi
property Commands[Index: Integer]: TADOCommand read GetCommand;
C++
__property TADOCommand* Commands[int Index] = {read=GetCommand};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Data.Win.ADODB.pas Data.Win.ADODB.hpp |
Data.Win.ADODB | TADOConnection |
Description
Lists all active commands for the connection component.
Use Commands to access active command components associated with a connection component. An active command component is one that is currently open.
Commands connected through an ADO connection object can be accessed in sequence through the Commands property in a loop based on CommandCount. For example, to execute all of the TADOCommand components connected through the TADOConnection component ADOConnection1:
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();