SiMX Help‎ > ‎The Target Platform‎ > ‎Objects‎ > ‎DS (Data Source)‎ > ‎

GetRelation


Common Objects


Description

Returns a relation object, which defines relations between the two tables, which identifiers are passed in as parameters.

Note: Use of aliases to identify the tables rather than table names is recommended.

Syntax

Function GetRelation( left, right )

Parameters

string left    - the left table identified by an alias or table name
string right - the right table identified by alias or table name

Return Values

object - the relationship between left and right

Example

Dim rel
Set rel = DS.GetRelation( "Accounts", "Items" )

rel.definition = "Accounts.AccountID=Items.AccountID"

Note: Because the return value is an object, using the keyword Set is mandatory in VBScript.

See also