Try OpenEdge Now
skip to main content
ProDataSets
Introducing the OpenEdge DataSet : Defining a static ProDataSet : Defining an inactive Data-Relation
 

Defining an inactive Data-Relation

The NOT-ACTIVE option on the static Data-Relation definition is used to define a relation as inactive at compile time. This allows you to have two relations between the same two ProDataSet temp-table buffers, but only have one active at a time.
One reason you might want multiple Data-Relations between the same buffers is because it is efficient to fill the ProDataSet using one parent-child hierarchy, but to navigate using a reverse hierarchy. A data-rel-spec such as "FOR Customer, Order" might be good for navigation, but if the source is based on order.orderdate, then "FOR Order, Customer" is better for filling the ProDataSet.
For dynamic ProDataSets, an optional parameter of the ADD-RELATION method is used to define a Data-Relation as inactive. For more information about this method, see CreatingData-Relation objects.
At run time, you selectively enable or disable a Data-Relation using the ACTIVE attribute on the Data-Relation handle.