Navigation: ABC Library Reference > RelationManager > RelationManager Methods >====== SetOpenRelated (force Open to open all the related tables) ====== | |
SetOpenRelated( )
SetOpenRelated | Force the RelationManager.Open method to open all the related tables in levels deeper than one. |
The SetOpenRelated method is used to trigger the open of all related tables of a target primary table. Any table that is included in a VIEW is always opened. SetOpenRelated ensures that other tables not in a View will be opened unconditionally. By default, the RelationManager Open method only opens the first level of child tables for overall performance benefits in multithreaded applications.
Implementation:
The SetOpenRelated method sets a PRIVATE property to trigger the opening of all related tables. It is usually called just prior to the primary table's Open method
Example:
SELF.AddItem(?Close,RequestCancelled) !Add the close control to the window manager
Relate:Jobs.SetOpenRelated() ! Open all tables related to Jobs
Relate:Jobs.Open ! File Jobs used by this procedure, so make
! sure its RelationManager is open
SELF.FilesOpened = True
! Initialize the browse manager
BRW1.Init(?Browse:1,Queue:Browse:1.ViewPosition,BRW1::View:Browse,Queue:Browse:1,Relate:Jobs,SELF)
SELF.Open(QuickWindow)