RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TADOConnection.CommandCount Property

Indicates the number of command components associated with the connection.

Pascal
property CommandCount: Integer;
C++
__property int CommandCount;

Read CommandCount to determine the number of command components associated with the connection component. A command component is associated with a connection component if its Connection property is set to the connection component. 

CommandCount can be used as the basis for a loop to access each command component using the Commands property. 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();

 

DataSetCount 

DataSets 

Commands 

Accessing the Connection's Datasets

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!