IMetabaseUpdateObjectNode.KeepNativeNames

Syntax

KeepNativeNames: Boolean;

Description

The KeepNativeNames property determines whether object physical name is saved on its update.

Comments

Available values:

Example

Executing the example requires that the repository contains an MDM dictionary with the RDS identifier.

Add links to the Metabase, Rds system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    rds: IMetabaseObjectDescriptor;
    metaDict: IMetaDictionary;
    Attrs: IMetaAttributes;
    Obj: IMetabaseObjectDescriptor;
    Upd: IMetabaseUpdate;
    Nd: IMetabaseUpdateObjectNode;
    RootFolder: IMetabaseUpdateFolderNode;
    NdFol: IMetabaseUpdateFolderNode;
Begin
    
// Get repository
    Mb := MetabaseClass.Active;
    
// Get MDM dictionary
    rds := mb.ItemById("RDS");
    metaDict := rds.Bind 
As IMetaDictionary;
    
// Get dictionary attributes
    Attrs := metaDict.Attributes;
    
// Determine table name use on repository update
    Attrs.KeepTableNativeNameOnMetabaseUpdate := True;
    
// Create update object
    Upd := Mb.CreateUpdate;
    
// Create update structure object
    RootFolder := Upd.RootFolder;
    
// Get MDM dictionary table
    Obj := Mb.ItemById("RDS").Children.Item(0).Edit;
    
// Rename table
    Obj.Name := "123Table";
    
// Add table to update structure
    Nd := RootFolder.Add(MetabaseUpdateNodeType.Object) As IMetabaseUpdateObjectNode;
    Nd.Object := Obj;
    
// Save physical table name on update
    Nd.KeepNativeNames := True;
    
// Add MDM dictionary to update structure
    Nd := RootFolder.Add(MetabaseUpdateNodeType.Object) As IMetabaseUpdateObjectNode;
    Nd.Object := rds;
    NdFol := (Nd 
As IMetabaseUpdateFolderNode);
    
// Save update to file
    Upd.SaveToFileNF("C:\Update.pefx");
End Sub UserProc;

After executing the example, the update will be created. The physical name of table is changed and will be saved on update.

See also:

IMetabaseUpdateObjectNode