Sets the given relation property in a master-detail relationship.
SET_RELATION_PROPERTY
(relation_id Relation,
property NUMBER,
value NUMBER);
SET_RELATION_PROPERTY
(relation_name VARCHAR2,
property NUMBER,
value NUMBER);
Built-in Type unrestricted procedure
Enter Query Mode yes
AUTO_QUERY Specifies that the detail block of this relation is to be automatically coordinated upon instantiation of the block. This allows potentially expensive processing to be deferred until blocks that are involved in relations are actually visited. Valid values are PROPERTY_TRUE and PROPERTY_FALSE.
DEFERRED_COORDINATION Specifies that a block requiring coordination is to be marked but not coordinated until the detail blocks are instantiated. Deferred coordination refers only to the population phase of coordination. Even deferred detail blocks are cleared during the clear phase of coordination to present the form in a visually consistent state. Valid values are PROPERTY_TRUE and PROPERTY_FALSE.
MASTER_DELETES (Now called the Delete Record Behavior Property) Specifies the default relation behavior for deletion of a detail record in the detail block when there is a corresponding master record in the master block. Valid values are NON-ISOLATED, ISOLATED, or CASCADING. The ability to set this property programmatically is included only for designers who are coding their own master-detail coordination. It does not alter a default relation that was created at design time.
PREVENT_MASTERLESS_OPERATION Specifies that operations in a detail block are not allowed when no corresponding master record exists. Valid values are PROPERTY_TRUE and PROPERTY_FALSE.
value The following constants can be supplied for the properties described earlier:
CASCADING Specifies that the MASTER_DELETES property is to be set so that when an operator deletes a master record, its corresponding detail records are locked at the same time as the master records are locked.
ISOLATED Specifies that the MASTER_DELETES property is to be set so that an operator can delete a master record for which detail records exist. This does not cause subsequent locking and deletion of detail records, however, Oracle Forms still initiates detail block coordination in this case.
NON_ISOLATED Specifies that the MASTER_DELETES property is to be set so that if the operator attempts to delete a master record for which detail records exist, Oracle Forms issues an error message and disallows the deletion.
PROPERTY_TRUE Specifies that the property is to be set to the TRUE state.
PROPERTY_FALSE Specifies that the property is to be set to the FALSE state.
You can only set one property per call to this Built-in.
/*
** Built-in: SET_RELATION_PROPERTY
** Example: Set the coordination behavior of a relation to
** be deferred, and auto-query.
*/
PROCEDURE Make_Relation_Deferred( rl_name VARCHAR2 ) IS
rl_id Relation;
BEGIN
/*
** Look for the relation's ID
*/
rl_id := Find_Relation( rl_name );
/*
** Set the two required properties
*/
Set_Relation_Property(rl_id,AUTOQUERY,PROPERTY_TRUE);
END;