DbServer.SetRelation Method (Typed) | |
Set a relation from this server to the child server.
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.19
Syntax VIRTUAL METHOD SetRelation(
oDBChild AS DbServer,
uRelation AS USUAL,
cRelation AS STRING,
lSelective AS LOGIC
) AS LOGIC
public virtual bool SetRelation(
[DefaultParameterValueAttribute(null, 0)] DbServer oDBChild,
Usual uRelation,
[DefaultParameterValueAttribute("", 0)] string cRelation,
[DefaultParameterValueAttribute(false, 0)] bool lSelective
)
Request Example
View SourceParameters
- oDBChild
- Type: DbServer
The server attached to the child server must be specified as a DBServer object (not as an alias). If oDBChild is omitted, all relations for this server are removed (the recommended way of doing this is the ClearRelations() method).
- uRelation
- Type: Usual
The relation code block for the server or the name or symbol representing the field from this server; a code block is constructed and macro-compiled - cRelation
- Type: String
When the relation is specified as a code block, a string version of the code block can be provided as well; it is returned by the Relation() method. - lSelective
- Type: Logic
Should this be a selective relation ?
Return Value
Type:
Logic
TRUE if successful; otherwise, FALSE.
Remarks
Sends a NotifyRecordChange message to the child server, if successful.
As always, the child work area should have a controlling index that matches the expression.
Examples
The API can take these forms:
1oDBCustomer:SetRelation(oDBOrders, {||_FIELD->CustNo},"CustNo")
2oDBCustomer:SetRelation(oDBOrders, #CustNo)
3oDBCustomer:SetRelation(oDBOrders, {#LastName, #Initial, #FirstName})
See Also