New user here....
Looking at UniDAC for multiple DBs....
Am playing with the UniMetaData component.
I understand the concept of putting in the proper restriction to get a list of metadata attributes.... How do I find out what restrictions are valid?
For example, if I am looking at Constraints, what are valid RESTRICTIONS? What about for TABLES, etc.
For example...
OraMetaData1.MetaDataKind := 'Tables';
OraMetaData1.Restrictions.Values['TABLE_SCHEMA'] := '"schemaname"';
OraMetaData1.Open;
How do I list all possible options instead of 'TABLE_SCHEMA'?
Thanks
GS
How to find out what are valid RESTRICTIONS for MetaData
Hello,
To get all the possible values of the Restrictions in UniDAC, you may use the following code:
To get all the possible values of the Restrictions in UniDAC, you may use the following code:
Code: Select all
var
lstMetaDataKinds, lstRestrictions: TStringList;
i, j: integer;
begin
lstMetaDataKinds:= TStringList.Create;
lstRestrictions := TStringList.Create;
try
UniMetaData1.GetMetaDataKinds(lstMetaDataKinds);
for i := 0 to lstMetaDataKinds.Count - 1 do
begin
UniMetaData1.GetRestrictions(lstRestrictions,lstMetaDataKinds);
for j := 0 to lstRestrictions.Count - 1 do
ShowMessage(Format('MetaDataKind : %s - Restriction : %s',[lstMetaDataKinds,lstRestrictions[j]]));
end;
finally
lstRestrictions.Free;
lstMetaDataKinds.Free;
end;Minor Tweaks
The code did need some minor changing....
Thanks!
Code: Select all
var
lstMetaDataKinds, lstRestrictions: TStringList;
i, j: integer;
begin
lstMetaDataKinds:= TStringList.Create;
lstRestrictions := TStringList.Create;
try
UniMetaData1.GetMetaDataKinds(lstMetaDataKinds);
for i := 0 to lstMetaDataKinds.Count - 1 do
begin
UniMetaData1.GetRestrictions(lstRestrictions,lstMetaDataKinds.Strings[i]);
for j := 0 to lstRestrictions.Count - 1 do
Memo2.Lines.Add(Format('MetaDataKind : %s - Restriction : %s',[lstMetaDataKinds[i],lstRestrictions[j]]));
end;
finally
lstRestrictions.Free;
lstMetaDataKinds.Free;
end;
endThanks!