This document is archived and information here might be outdated. Recommended version. |
Array of relates associated to the table.
[Visual Basic .NET] Public ReadOnly Property RelateInfos As IRelateInfos
[C#] public IRelateInfos RelateInfos {get;}
[C++]
HRESULT get_RelateInfos(
IRelateInfos** RelateInfo
);
[C++] Parameters RelateInfo [out, retval]
RelateInfo is a parameter of type IRelateInfos**
In order for MapServer to advertise a relationship, both source and destination layer/standalone table must be added to the source map document. For example, Layer A is related to Table B in the GeoDatabase; Layer A is added to the map while Table B is not, in this scenario, MapServer will not publicize this relationship and therefore QueryRelatedRows function cannot be used to get related row(s) for feature from Layer A.
Example: Printing a list of all relates a layer or table is participating
IRelateInfos pRIs = null;
IRelateInfo pRI = null;
pRIs = pMTI.RelateInfos;
if (pRIs == null)
{
Console.WriteLine("No relationship is available");
return;
}
for (int j = 0; j < pRIs.Count; j++)
{
pRI = pRIs.get_Element(j);
Console.WriteLine(pRI.Name + ", " + pRI.RelationshipID + ", " + pRI.RelatedTableID);
}