Data.Win.ADODB.TCustomADODataSet.IndexDefs

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property IndexDefs: TIndexDefs read FIndexDefs write FIndexDefs;

C++

__property Data::Db::TIndexDefs* IndexDefs = {read=FIndexDefs, write=FIndexDefs};

Properties

Type Visibility Source Unit Parent
property protected
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Data.Win.ADODB TCustomADODataSet

Description

Contains the definitions of the indexes for the current table.

IndexDefs contains definitions for each index the current table has. IndexDefs is a collection of TIndexDef

objects. Each TIndexDef object contains the definition for one index.

Inspect IndexDefs at runtime to get information on a given index. Use an index with IndexDefs to address a specific TIndexDef object. Use properties of TIndexDef to evaluate various index attributes. The example below retrieves the fields list for the third index of the table accessed through the component ADOTable1.



ADOTable1.IndexDefs.Update;
StrVar := ADOTable1.IndexDefs[2].Fields;



ADOTable1->IndexDefs->Update();
StrVar = ADOTable1->IndexDefs[2] ->Fields;



Call the Data.DB.TIndexDefs.Update method prior to inspecting the property to ensure it contains the most current index information for the table.

See Also