Equivalent of BDE TTable IndexFieldCount property?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
stevel
Posts: 125
Joined: Tue 02 Nov 2010 19:01

Equivalent of BDE TTable IndexFieldCount property?

Post by stevel » Wed 24 Jul 2013 03:37

For TUniTable (Interbase provider), what is the equivalent property for BDE TTable IndexFieldCount?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Equivalent of BDE TTable IndexFieldCount property?

Post by AlexP » Wed 24 Jul 2013 08:28

Hello,

Our products have no property similar to IndexFieldCount in BDE. To retrieve the information about the number of index fields in a table and the information about the index, you can use TUniMetaData, for example:

Code: Select all

var
  UniMetaData: TUniMetaData;
begin
  UniMetaData := TUniMetaData.Create(nil);
  UniMetaData.Connection := UniConnection1;
  UniMetaData.MetaDataKind := 'IndexColumns';
  UniMetaData.Restrictions.Add('TABLE_NAME=ALEXP_ID_ID');
  UniMetaData.Open;
  ShowMessage(IntToStr(UniMetaData.RecordCount));
end;

Post Reply