Function DbClearRelation() Foundation

Clears all current relations in a work area.

Syntax
DbClearRelation() --> NIL
Return

The return value of DbClearRelation() is always NIL.

Description

All relations in a work area are cleared by the database function DbClearRelation(). When the function is used without the alias operator, the relations are cleared in the current work area.

The command SET RELATION TO with no specified link expression can be used instead of DbClearRelation(). SET RELATION is only effective in the current work area.

Examples
DbClearRelation()
// In the example, a relation is created between an invoice 
// file and a customer file. The names of the customers who 
// have not yet posted a payment are listed. Afterwards, 
// the relation is cleared. 
PROCEDURE Main 
   USE Customer NEW EXCLUSIVE 
   INDEX ON CustNo TO CustNo 
   SET INDEX TO CustNo 

   USE Invoice NEW 

   DbSetRelation( "Customer" , ; 
                  {||Invoice->CustNo} , ; 
                  "Invoice->CustNo"     ) 

   LIST Invoice->CustNo    , ; 
        Customer->CustNo    , ; 
        Customer->LastName , ; 
        Customer->FirstName  ; 
        FOR Invoice->Payment == 0 

   DbClearRelation() 

   CLOSE Customer 
   CLOSE Invoice 

RETURN 

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.