Creates a relate between the Recordset associated with the Layer and a DataSource object.


Namespace: ActualMap
Assembly: ActualMap (in ActualMap.dll)

Syntax

Visual Basic (Declaration)
Public Function AddRelate( _ 
   ByVal fromField As String,  _ 
   ByVal dataSource As Object,  _ 
   ByVal toField As String _ 
) As Boolean
C#
public bool AddRelate(
   string fromField,
   object dataSource,
   string toField
)
C++
public:
 bool AddRelate(
   String fromField,
   Object dataSource,
   String toField
) sealed 
J#
public bool AddRelate(
   string fromField,
   object dataSource,
   string toField
)
JScript
public  function AddRelate(
   fromField : String,
   dataSource : Object,
   toField : String
) : bool

Parameters

fromField
A string expression that evaluates to the name of a field in the Recordset associated with the Layer.
dataSource
An object expression that evaluates to a DataSource object that contains the data to relate to the Layer object's Recordset.
toField
A string expression that evaluates to the name of a field in dataSource.

Return Value

The method returns True on success.

Remarks

The AddRelate method creates a join between a Layer and a data source. The result is a Recordset which contains all the records from the Layer, and also new attribute fields from the data source. The attribute fields have values if a matching value in the fromField and toField is found.

See Also