RDD

DbClearRelation()

Clear all relations from the current work area

Syntax

Signature
DbClearRelation() --> NIL

Arguments

None.

Return value

NIL.

Description

DbClearRelation() removes every active relation whose child is the current work area. Related child areas are no longer repositioned by the parent.

Notes

The function does not close either work area.

Example

DbClearRelation.prg
PROCEDURE Main()


   DbUseArea( .T., , "people.dbf", "People" )
   DbUseArea( .T., , "orders.dbf", "Orders" )
   DbSelectArea( "People" )
   DbSetRelation( "Orders", {|| FIELD->ID }, "ID" )
   QOut( "Before clear: " + IIF( Empty( DbRelation( 1 ) ), "NONE", "SET" ) )
   DbClearRelation()
   QOut( "After clear: " + IIF( Empty( DbRelation( 1 ) ), "NONE", "SET" ) )
   DbCloseAll()

   
   RETURN

Output

See also