Click or drag to resize

DbClearRelation Function

X#
Clear any active relations.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION DbClearRelation() AS LOGIC
Request Example View Source

Return Value

Type: Logic
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 overload 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