IMetaRdsExportSchema.RemoveMapping

Fore Syntax

RemoveMapping(Index: Integer): Boolean;

Fore.NET Syntax

RemoveMapping(Index: integer): boolean;

Parameters

Index. Binding index.

Description

The RemoveMapping method removes attribute binding to a data provider field.

Comments

This method returns True if the binding is successfully removed.

Fore Example

The example is a procedure with a single input parameter:

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(0Then
            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.

Fore.NET Example

The example is a procedure with a single input parameter:

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(0Then
            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:

IMetaRdsExportSchema