Click or drag to resize

DbClearRelation Function (Usual)

Clear any active relations.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.4a
Syntax
 FUNCTION DbClearRelation(
	uArea AS USUAL
) AS LOGIC
View Source

Parameters

uArea
Type: Usual
Specifies the work area name or number for a table on which the operation must be performed.

Return Value

Type: Boolean
TRUE if successful; otherwise FALSE.
Remarks
DBClearRelation() performs the same function as the SET RELATION command with no clauses specified.  
For more information, refer to the SET RELATION command. By default, this function operates on the currently selected work area.   It can be made to operate on an unselected work area by specifying it within an aliased expression or by calling the that accepts a workarea parameter (a workarea number or alias ).
Examples
The following example sets a relation, lists data, and then clears the relation:
X#
1USE employee NEW
2USE department NEW INDEX dept
3SELECT Employee
4DBSetRelation("Department", ;
5    {|| Employee->Dept}, "Employee->Dept")
6LIST Employee->Name, Department->Name
7DBClearRelation()
See Also