DuplicatedImportExportIds: Array;
DuplicatedImportExportIds: System.Array;
The DuplicatedImportExportIds property returns identifiers that match in import and export schemes.
It is not allowed to convert and MDM dictionary containing import or export schema with the P7_RDS_CONVERT_OBJECT_SCHEMA identifier.
Executing the example requires an MDM repository with the 16008 key that contains MDM dictionaries required to convert to table MDM dictionaries.
Add links to the Metabase, Rds system assemblies.
Sub UserProc;
Var
RDS_DB: IRdsDatabase;
Converter: IRdsDictionaryConverter;
List: IRdsDictionaryConverterList;
NotConv: IMetabaseObjectDescriptors;
pReasons: IRdsNotConvertibleReasons;
pReason: IRdsNotConvertibleReason;
ReasonMetaDictConstr: IRdsNotConvertibleReasonMetaDictionaryConstraint;
i, j, k: Integer;
Begin
RDS_DB := MetabaseClass.Active.Bind(16008) As IRdsDatabase;
Converter := New RdsDictionaryConverter.Create;
List := Converter.AllRdsDatabase(RDS_DB);
NotConv := List.NotConvertibleDictionaries;
For i := 0 To NotConv.Count - 1 Do
pReasons := List.GetNotConvertibleReasons(NotConv.Item(i).Key);
For j := 0 To pReasons.Count - 1 Do
pReason := pReasons.Item(j);
ReasonMetaDictConstr := pReason As IRdsNotConvertibleReasonMetaDictionaryConstraint;
Debug.Write("Matching identifiers of import or export schemes: ");
For k := 0 To ReasonMetaDictConstr.DuplicatedImportExportIds.Length - 1 Do
Debug.WriteLine(ReasonMetaDictConstr.DuplicatedImportExportIds[k]);
End For;
End For;
End For;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Rds;
…
Public Shared Sub Main(Params: StartParams);
Var
RDS_DB: IRdsDatabase;
Converter: IRdsDictionaryConverter;
List: IRdsDictionaryConverterList;
NotConv: IMetabaseObjectDescriptors;
pReasons: IRdsNotConvertibleReasons;
pReason: IRdsNotConvertibleReason;
ReasonMetaDictConstr: IRdsNotConvertibleReasonMetaDictionaryConstraint;
i, j, k: Integer;
DuplicatedIds: System.Array;
Begin
RDS_DB := Params.Metabase.Bind(16008) As IRdsDatabase;
Converter := New RdsDictionaryConverter.Create();
List := Converter.AllRdsDatabase(RDS_DB);
NotConv := List.NotConvertibleDictionaries;
For i := 0 To NotConv.Count - 1 Do
pReasons := List.GetNotConvertibleReasons(NotConv.Item[i].Key);
For j := 0 To pReasons.Count - 1 Do
pReason := pReasons.Item[j];
ReasonMetaDictConstr := pReason As IRdsNotConvertibleReasonMetaDictionaryConstraint;
System.Diagnostics.Debug.Write("Matching identifiers of import or export schemes: ");
For k := 0 To ReasonMetaDictConstr.DuplicatedImportExportIds.Length - 1 Do
DuplicatedIds := ReasonMetaDictConstr.DuplicatedImportExportIds;
System.Diagnostics.Debug.WriteLine(DuplicatedIds[k]);
End For;
End For;
End For;
End Sub;
After executing the example the console window displays matching identifiers of import or export schemes.
See also: