RemoveMapping(Index: Integer): Boolean;
RemoveMapping(Index: integer): boolean;
Index. Binding index.
The RemoveMapping method removes attribute binding to a data provider field.
This method returns True if the binding is successfully removed.
The example is a procedure with a single input parameter:
sExport. Object that contains parameters of exporting data from a table MDM dictionary.
Add a link to the Rds system assembly.
Sub clearMapping(sExport: IMetaRdsExportSchema);
Var
i, mc: Integer;
attrMap: IRdsExportSchemaAttribute;
Begin
mc := sExport.MappingsCount;
For i := 0 To mc - 1 Do
attrMap := sExport.ItemMapping(0);
If sExport.RemoveMapping(0) Then
Debug.WriteLine("Attribute binding '"
+ attrMap.Attribute.Id + "' removed");
End If;
End For;
End Sub clearMapping;
After executing the example all attributes' bindings to data provider fields are removed in the sExport object. Attribute names are displayed in the console window.
The example is a procedure with a single input parameter:
sExport. Object that contains parameters of exporting data from a table MDM dictionary.
Imports Prognoz.Platform.Interop.Rds;
…
Public Shared Sub clearMapping(sExport: IMetaRdsExportSchema);
Var
i, mc: Integer;
attrMap: IRdsExportSchemaAttribute;
Begin
mc := sExport.MappingsCount;
For i := 0 To mc - 1 Do
attrMap := sExport.ItemMapping[0];
If sExport.RemoveMapping(0) Then
System.Diagnostics.Debug.WriteLine("Attribute binding '"
+ attrMap.Attribute.Id + "' removed");
End If;
End For;
End Sub clearMapping;
After executing the example all attributes' bindings to data provider fields are removed in the sExport object. Attribute names are displayed in the console window.
See also: