DbServer.SetSelectiveRelation Method | |
Set a selective relation from this server to the child server; standard database operations are restricted to those records that match the relation.
Namespace:
VO
Assembly:
VORDDClasses (in VORDDClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD SetSelectiveRelation(
oDBChild,
uRelation,
cRelation
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public virtual Usual SetSelectiveRelation(
Usual oDBChild = default,
Usual uRelation = default,
Usual cRelation = default
)
Request Example
View SourceParameters
- oDBChild (Optional)
- Type: Usual
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 (Optional)
- 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 (Optional)
- Type: Usual
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.
Return Value
Type:
Usual
TRUE if successful; otherwise, FALSE.
Remarks
Sends a NotifyRecordChange message to the child server, if successful.
As always, the expression should match or be a partial index of the controlling index of the child's work area.
Examples
The API can take these forms:
1oDBCustomer:SetSelectiveRelation(oDBOrders, {||_FIELD->CustNo},"CustNo")
2oDBCustomer:SetSelectiveRelation(oDBOrders, #CustNo)
3oDBCustomer:SetSelectiveRelation(oDBOrders, {#LastName,#Initial,#FirstName})
See Also