IDalConnection.Views

Syntax

Views(ViewName: String): IDalViews;

Parameters

ViewName. Physical name of the table in the database.

Description

The Views property returns the cursor containing system information about the specified view.

Comments

If an empty row is specified as the value of the ViewName property, the property returns the cursor containing the information about all views, which are in the database.

Example

Sub UserProc;
Var
    Driver: IDalDriver;
    Connect: IDalConnection;
    ViewsCur: IDalViews;
    ConnectDesc: IDalConnectionDescriptor;
    ConnectDescParams: IDalConnectionDescriptorParams;
    ColFields: IDalCursorFields;
    ColField: IDalCursorField;
    i: Integer;
Begin
    Driver := New DalOrcl8Driver.Create;
    ConnectDesc := Driver.CreateDescriptor;
    ConnectDescParams := ConnectDesc.Params;
    ConnectDescParams.Find("User Name").Value := "User";
    ConnectDescParams.Find("Password").Value := "Password";
    ConnectDescParams.Find("Host BSTR").Value := "OrclServer";
    ConnectDescParams.Find("Schema").Value := "Repository";
    Connect := ConnectDesc.CreateConnection;
    //Parameters of the View_1 view
    ViewsCur := Connect.Views("View_1");
    ColFields := ViewsCur.Fields;
    //View parameters and their values
    While Not ViewsCur.Eof Do
        i := i + 1;
        Debug.WriteLine("Parameter number: " + i.ToString);
        Debug.Indent;
        For Each ColField In ColFields Do
            Debug.WriteLine(ColField.Name + " = " + ColField.Value);
        End For;
        Debug.Unindent;
        ViewsCur.Next;
    End While;
    ViewsCur.Close;
    Connect.Close;
End Sub UserProc;

On executing the example the repository connection is established with specified location parameters. A cursor with parameters of the View_1 view is created based on the connection. Information about parameters and their values is displayed in the development environment console.

See also:

IDalConnection