Hello,
I want a list of indexes from a certain table in MySQL.
What is wrong in this code?
IndexListBox.Clear;
UniMetaData1.Filter:=MyTablename;
UniMetaData1.MetaDataKind:='Indexes';
UniMetaData1.Open;
UniMetaData1.First;
While not UniMetaData1.Eof do
begin
IndexListBox.Items.add(UniMetaData1.FieldValues['COLUMN_NAME']);
UniMetaData1.Next;
end;
How to use UniMetadata
Re: How to use UniMetadata
Hi there,
In order to get the list of index names, you may use the following code:
In order to get the list of index columns, you may use the following code:
You may also find more information about TUniMetaData component on our site:
https://www.devart.com/unidac/docs/Deva ... aData.htm
Regards,
Viktor
In order to get the list of index names, you may use the following code:
Code: Select all
IndexListBox.Clear;
UniMetaData1.Restrictions.Values['TABLE_NAME'] := MyTablename;
UniMetaData1.MetaDataKind:='Indexes';
UniMetaData1.Open;
UniMetaData1.First;
While not UniMetaData1.Eof do begin
IndexListBox.Items.add(UniMetaData1.FieldValues['INDEX_NAME']);
UniMetaData1.Next;
end;
Code: Select all
IndexListBox.Clear;
UniMetaData1.Restrictions.Values['TABLE_NAME'] := MyTablename;
UniMetaData1.MetaDataKind:='IndexColumns';
UniMetaData1.Open;
UniMetaData1.First;
While not UniMetaData1.Eof do begin
IndexListBox.Items.add(UniMetaData1.FieldValues['COLUMN_NAME']);
UniMetaData1.Next;
end;
https://www.devart.com/unidac/docs/Deva ... aData.htm
Regards,
Viktor
Re: How to use UniMetadata
Thank you, Victor.
It's works now.
It's works now.
Re: How to use UniMetadata
Hi there!
I’m glad that your issue is fully resolved now and you can use all the features of our product.
In case you will get any additional questions simply submit a new request or reply in this topic.
Regards,
Viktor
I’m glad that your issue is fully resolved now and you can use all the features of our product.
In case you will get any additional questions simply submit a new request or reply in this topic.
Regards,
Viktor