IView.AlterView

Syntax

AlterView(OldView: IView);

Parameters

OldView is the view, structure of which should be updated according to the structure of current procedure.

Description

The AlterView method updates the structure of OldView view on DB server according to the structure of current view.

Example

Sub Main;

Var

MB: IMetabase;

View, OldView: IView;

Begin

Mb := MetaBaseClass.Active;

View := Mb.ItemById("View_1").Edit As IView; //view according to structure of which we update

OldView := Mb.ItemById("View_2").Bind As IView; //view, structure on DB server of which we update

View. NativeName: = OldView. NativeName; //we temporarily set identical physical names.

//It is necessary to save uniqueness of phys. name of OldView view

View.AlterView(OldView);

End Sub Main;

After executing the example, the view structure, referenced by the Table_2 repository view, is updated on a database server. The structure is set according to the view structure, referenced by the repository View_1 log.

See also:

IView