Click or drag to resize

Functions.DbClearRelation Method

Clear any active relations.

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

Return Value

Type: Logic
TRUE if successful; otherwise FALSE.
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 ).
The following example sets a relation, lists data, and then clears the relation:
1USE employee NEW
2USE department NEW INDEX dept
3SELECT Employee
4DBSetRelation("Department", ;
5    {|| Employee->Dept}, "Employee->Dept")
6LIST Employee->Name, Department->Name
See Also