Relation Function | |
Returns a specified relational expression for a table that is open in a specific work area.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax FUNCTION Relation(
nRelationNumber,
uArea
) AS STRING CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static string Relation(
Usual nRelationNumber = default,
Usual uArea = default
)
Request Example
View SourceParameters
- nRelationNumber (Optional)
- Type: Usual
Specifies which relation is returned. For example, if nRelationNumber is 3, RELATION( ) returns the relational expression for the third relation created.
- uArea (Optional)
- Type: Usual
Specifies the work area for a table open in another work area. If a table is not open in the specified work area, RELATION( ) returns an empty string.
Or
Specifies the table alias for a table open in another work area.
Return Value
Type:
String
Character
Remarks
By default, RELATION( ) returns relational expressions for a specified table. If you do not specify a work area or alias, RELATION( ) returns relational expressions for the table in the currently selected work area. If no relations exist, it returns an empty string. For additional information about creating relations between tables, see Set RELATION.
Display Status and LIST Status display relational expressions. Issue MODIFY Database to display the Database Designer. This enables you to view and modify relations between tables in the current open database. Issue Set to display the Data Session window. This enables you to view and modify relations between free tables.
Examples 1Close Databases
2Open Database (HOME(2) + 'Data\testdata')
3Use customer IN 0 Order cust_id
4Use employee IN 0 Order emp_id
5Use orders IN 0 Order order_id
6Select orders
7Set RELATION TO emp_id Into employee
8Set RELATION TO cust_id Into customer ADDITIVE
9? RELATION(1)
10? RELATION(2)
11? RELATION(3)
See Also