Hi,
I have some code like this:
IBCMetaData.MetaDataKind := 'Constraints';
IBCMetaData.Filter := 'TABLE_NAME = ''PLATFORM''';
IBCMetaData.Filtered := True;
IBCMetaData.Open;
It gives me the names of indexes in the PLATFORM table. How can I then find out which fields are in each index?
IBCMetadata and index properties
Re: IBCMetadata and index properties
Hekko.
It's better to use the Restrictions property of the TIBCMetadata component instead of the Filter property to limit the list of database objects to be described.
You can set the IBCMetaData.MetadataKind property to 'Indexes' and the TABLE_NAME restriction to 'PLATFORM' to retrieve the list of indexes in the PLATFORM table. Then, you can set the IBCMetaData.MetadataKind property to 'IndexColumns' and the INDEX_NAME restriction to the index name to retrieve the list of columns in the index.
It's better to use the Restrictions property of the TIBCMetadata component instead of the Filter property to limit the list of database objects to be described.
You can set the IBCMetaData.MetadataKind property to 'Indexes' and the TABLE_NAME restriction to 'PLATFORM' to retrieve the list of indexes in the PLATFORM table. Then, you can set the IBCMetaData.MetadataKind property to 'IndexColumns' and the INDEX_NAME restriction to the index name to retrieve the list of columns in the index.
Re: IBCMetadata and index properties
Great, thanks very much. That's exactly what I wanted.