RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TADOTable.IndexDefs Property

Contains the definitions of the indexes for the current table.

Pascal
property IndexDefs: TIndexDefs;
C++
__property TIndexDefs IndexDefs;

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 Update method (TIndexDefs) prior to inspecting the property to ensure it contains the most current index information for the table. 

 

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