InvalidImportExportId: String;
InvalidImportExportId: string;
The InvalidImportExportId property returns prohibited identifier for import or 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;
ReasonConvConstr: IRdsNotConvertibleReasonConverterConstraint;
i, j: 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);
ReasonConvConstr := pReason As IRdsNotConvertibleReasonConverterConstraint;
Debug.Write("Dictionary contains import or export scheme: ");
Debug.WriteLine(ReasonConvConstr.InvalidImportExportId);
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;
ReasonConvConstr: IRdsNotConvertibleReasonConverterConstraint;
i, j: Integer;
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];
ReasonConvConstr := pReason As IRdsNotConvertibleReasonConverterConstraint;
System.Diagnostics.Debug.Write("Dictionary contains import or export scheme: ");
System.Diagnostics.Debug.WriteLine(ReasonConvConstr.InvalidImportExportId);
End For;
End For;
End Sub;
After executing the example the console window displays prohibited identifier for import or export schemes.
See also: