GetTree method: Session class

Syntax

GetTree()

Description

The GetTree method returns a closed tree object. Before you can use some of the methods or any of the properties, you must use the Open method to open a tree object.

Parameters

None.

Returns

A reference to a closed tree object.

Example

To create a new tree, use the following:

&MYTREE = %Session.GetTree(); 
&MYTREE.Create("","","PERSONAL_NEW", "05-05-1997", "PERSONAL_DATA");

To determine if a tree already exists in the database, use the following code:

&MYTREE = %Session.GetTree(); 
If &MYTREE.Exists("","","PERSONAL_OLD", "05-05-1997", "PERSONAL_DATA") = 0 then 
     /* Do processing */ 
End-If;

To open an existing tree, use the following code:

&MYTREE = %Session.GetTree(); 
&MYTREE.Open("","","PERSONAL_OLD", "05-05-1997", "PERSONAL_DATA", True);