IDatabaseInstance.Views

Syntax

Views: IDatabaseViews;

Description

The Views property returns an object containing collection of all views, stored on database server.

Example

Sub UserProc;
Var
    MB: IMetabase;
    DBInst: IDatabaseInstance;
    Views: IDatabaseViews;
    ViewsName: IStringList;
Begin
    MB := MetabaseClass.Active;
    ViewsName := New StringList.Create;
    DBInst := MB.ItemById("BD").Open(NullAs IDatabaseInstance;
    Views := DBInst.Views;
    While Not Views.Eof Do
        ViewsName.Add(Views.ViewName);
        Views.Next;
    End While;
End Sub UserProc;

After executing the example, physical names of all views stored on database server, on which the database of repository with the BD identifier is set up, are contained in the ViewsName array.

See also:

IDatabaseInstance