Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Get Index Names
Get Index Names
Posted: 2007/10/02 20:47
 
How can I get all index Names from a Table? ADTable1.GetIndexNames(ComboBox1,Items) or ADMetaInfoQuery1.GetIndexNames(ComboBox1.Items)
are not working. (Delphi 5, Oracle 9i, AnyDac V 1.12.2)
best regards
Re:Get Index Names
Posted: 2007/10/02 23:12
 
Hello

1) GetIndexNames method allows to get names of client indexes, not server side indexes. This method works the same for all AnyDAC datasets.
2) To get all index names for table, you should use TADMetaInfoQuery component. Here is example, how you should setup it:

   object ADMetaInfoQuery1TADMetaInfoQuery     Active True     Connection ADConnection1     MetaInfoKind mkIndexes     ObjectName '"Orders"'   end


After you have activated it, just walk through dataset and read it INDEX_NAME field.

Regards,
Dmitry