RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TADOConnection.DataSets Property

Provides an indexed array of all active datasets for a connection component.

Pascal
property DataSets [Index: Integer]: TCustomADODataSet;
C++
__property TCustomADODataSet DataSets[int Index];

Use DataSets to access active datasets associated with a connection component. An active dataset is one that is currently open. 

Datasets connected through an ADO connection object can be accessed in sequence through the DataSets property in a loop based on DataSetCount.

var
  i: Integer;
begin
for i := 0 to (ADOConnection1.DataSetCount – 1) do
    ListBox1.Items.Add(ADOConnection1.DataSets[i].Name)
end;

 

for (int i = 0; i < ADOConnection1->DataSetCount; i++)
  ListBox1->Items->Add(ADOConnection1->DataSets[i]->Name);

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!