IMetabaseUpdateContext.RegisteStrChange

Syntax

RegisterStrChange(OldStr: String; NewStr: String);

Parameters

OldStr. Object attribute identifier before update.

NewStr. Object attribute identifier after update.

Description

The RegisterStrChange method redetermines identifiers of update object attributes.

Comments

The RegisterStrChange method changes the binding of attributes of export/import objects in the time series database by replacing the identifiers.

NOTE. This method is used to support old objects, which were not improved. Use IMetabaseUpdateContext.RegisterAttributeIdChange.

Example

Executing the example requires the C:\Update.pefx update file and a time series database in the repository. The database contains an export object with configured binding of attributes. The source repository contains one of the attributes of export object that is linked with the COUNTRY_RU dictionary, which contains names of countries in Russian. The destination repository contains a dictionary with the same purpose with the COUNTRY_EN identifier. This dictionary stores names of countries in English.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
MB: IMetabase;
    Update: IMetabaseUpdate;
    UpdateCxt: IMetabaseUpdateContext;
Begin
    MB := MetabaseClass.Active;
    Update := Mb.CreateUpdate;
    Update.LoadFromFileNF("C:\Update.pefx");
    UpdateCxt := Update.CreateUpdateContext;
    UpdateCxt.RegisterStrChange("COUNTRY_RU""COUNTRY_EN");
    Update.ApplyEx(Null, UpdateCxt);
End Sub UserProc;

After executing the example the export object attribute binding will be reconfigured from COUNTRY_RU to COUNTRY_EN.

See also:

IMetabaseUpdateContext