I'm using TMyMetaData with options columns to show all my tables with columns and definitions. I'm using a filter to select one schema (database), because only one database I want to see. But the filter doesn't work. I even created IndexFieldNames, but it doesn't help.
So how do I filter my data?
filtering TMyMetaData
If you want to use the Filter property you should set the TMyMetaData.Filtered property to True, like this:
Also you can use the Restrictions property to provide one or more conditions restricting the list of objects to be described. This is a better way, because filtering is executed on server.
For example:
Code: Select all
MyMetaData.Filter := 'TABLE_SCHEMA=''test''';
MyMetaData.Filtered := True;For example:
Code: Select all
MyMetaData.Restrictions.Values['TABLE_SCHEMA'] := 'test';You can specify the table to show information for, like this:
You can use the TMyMetaData.GetRestrictions method to find out which restrictions are applicable to a certain MetaDataKind.
Code: Select all
MyMetaData.Restrictions.Values['TABLE_NAME'] := 'table';