<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Joining Data in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/joining-data/m-p/228099#M5954</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; In the ESRI example they pass "OwnersTable" - what is that? &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe it is the ITable to join to the IFeatureLayer.&amp;nbsp; You need to replace OwnersTable with the Table in your implementation you wish to join to the target layer.&amp;nbsp; What is the source table and FeatureLayer you want to join?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Oct 2011 14:24:14 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2011-10-11T14:24:14Z</dc:date>
    <item>
      <title>Joining Data</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/joining-data/m-p/228096#M5951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In "Joining Data" in the help, the following code is given:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// Build a memory relationship class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Type memRelClassFactoryType = Type.GetTypeFromProgID(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "esriGeodatabase.MemoryRelationshipClassFactory");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IMemoryRelationshipClassFactory memRelClassFactory = &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (IMemoryRelationshipClassFactory)Activator.CreateInstance(memRelClassFactoryType)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IRelationshipClass relationshipClass = memRelClassFactory.Open("ParcelsOwners",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; parcelsFeatureClass, "PARCEL_ID", (IObjectClass)ownersTable, "PARCEL_ID", &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Is Owned By", "Owns", esriRelCardinality.esriRelCardinalityOneToOne);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But no explanation is provided for "ownersTable."&amp;nbsp; What is it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have created a QueryClass that implements the ITable interface and can be successfully casted to an ITable but that ITable cannot be casted to IObjectClass.&amp;nbsp; What can be?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 13:43:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/joining-data/m-p/228096#M5951</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2011-10-07T13:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Data</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/joining-data/m-p/228097#M5952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In "Joining Data" in the help, the following code is given:&lt;BR /&gt;&lt;BR /&gt;// Build a memory relationship class.&lt;BR /&gt;Type memRelClassFactoryType = Type.GetTypeFromProgID(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "esriGeodatabase.MemoryRelationshipClassFactory");&lt;BR /&gt;IMemoryRelationshipClassFactory memRelClassFactory = &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (IMemoryRelationshipClassFactory)Activator.CreateInstance(memRelClassFactoryType)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;BR /&gt;IRelationshipClass relationshipClass = memRelClassFactory.Open("ParcelsOwners",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; parcelsFeatureClass, "PARCEL_ID", (IObjectClass)ownersTable, "PARCEL_ID", &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Is Owned By", "Owns", esriRelCardinality.esriRelCardinalityOneToOne);&lt;BR /&gt;&lt;BR /&gt;But no explanation is provided for "ownersTable."&amp;nbsp; What is it?&lt;BR /&gt;&lt;BR /&gt;I have created a QueryClass that implements the ITable interface and can be successfully casted to an ITable but that ITable cannot be casted to IObjectClass.&amp;nbsp; What can be?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that you are attempting to Join the parcelsFeatureClass to the ownersTable in your code you posted.&amp;nbsp; Is that what you want?&amp;nbsp; Are you sure it shouldn't be the other way around?&amp;nbsp; That is, you want to join the ownersTable to the parcelsFeatureClass.&amp;nbsp; If so, it should be something like (this is VB.NET sorry):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
pMemoryRelationshipClassFactory = New MemoryRelationshipClassFactory
pRelationshipClass = pMemoryRelationshipClassFactory.Open("Join", ownersTable, TableFieldForJoin, pFeatureLayer.DisplayFeatureClass, LayerFieldForJoin, "forward", "backward", esriRelCardinality.esriRelCardinalityOneToOne)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 11:06:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/joining-data/m-p/228097#M5952</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-11T11:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Data</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/joining-data/m-p/228098#M5953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I think that you are attempting to Join the parcelsFeatureClass to the ownersTable in your code you posted.&amp;nbsp; Is that what you want?&amp;nbsp; Are you sure it shouldn't be the other way around?&amp;nbsp; That is, you want to join the ownersTable to the parcelsFeatureClass.&amp;nbsp; If so, it should be something like (this is VB.NET sorry):&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I appreciate your answer criticizing ESRI code. What I am trying to discover is the correct data type to pass to IMemoryRelationshipClassFactory.Open.&amp;nbsp; When I try to pass an ITable object it fails.&amp;nbsp; In the ESRI example they pass "OwnersTable" - what is that? They never say (like most of their useless and confusing documentation.)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 14:07:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/joining-data/m-p/228098#M5953</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2011-10-11T14:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Data</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/joining-data/m-p/228099#M5954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; In the ESRI example they pass "OwnersTable" - what is that? &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe it is the ITable to join to the IFeatureLayer.&amp;nbsp; You need to replace OwnersTable with the Table in your implementation you wish to join to the target layer.&amp;nbsp; What is the source table and FeatureLayer you want to join?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 14:24:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/joining-data/m-p/228099#M5954</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-10-11T14:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Data</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/joining-data/m-p/228100#M5955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I believe it is the ITable to join to the IFeatureLayer.&amp;nbsp; You need to replace OwnersTable with the Table in your implementation you wish to join to the target layer.&amp;nbsp; What is the source table and FeatureLayer you want to join?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In case anyone needs to know: I can only pass an actual ITable.&amp;nbsp; If you build your own class that implements ITable it will not pass correctly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 13:59:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/joining-data/m-p/228100#M5955</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2011-10-13T13:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Data</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/joining-data/m-p/228101#M5956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In "Joining Data" in the help, the following code is given:&lt;BR /&gt;&lt;BR /&gt;// Build a memory relationship class.&lt;BR /&gt;Type memRelClassFactoryType = Type.GetTypeFromProgID(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "esriGeodatabase.MemoryRelationshipClassFactory");&lt;BR /&gt;IMemoryRelationshipClassFactory memRelClassFactory = &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (IMemoryRelationshipClassFactory)Activator.CreateInstance(memRelClassFactoryType)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;BR /&gt;IRelationshipClass relationshipClass = memRelClassFactory.Open("ParcelsOwners",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; parcelsFeatureClass, "PARCEL_ID", (IObjectClass)ownersTable, "PARCEL_ID", &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Is Owned By", "Owns", esriRelCardinality.esriRelCardinalityOneToOne);&lt;BR /&gt;&lt;BR /&gt;But no explanation is provided for "ownersTable."&amp;nbsp; What is it?&lt;BR /&gt;&lt;BR /&gt;I have created a QueryClass that implements the ITable interface and can be successfully casted to an ITable but that ITable cannot be casted to IObjectClass.&amp;nbsp; What can be?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try casting parcelsFeatureClass as an IObjectClass like you did the ownerstable. It's expecting an IObjectClass.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically the IRelationshipClass portion of the code is examining your relationship class. If you open your relationship class in Arc Catalog and examine the properties you should be able to use the .Net IntelliSense to correctly complete the required parameters of the function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;G&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 21:34:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/joining-data/m-p/228101#M5956</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2011-10-13T21:34:07Z</dc:date>
    </item>
  </channel>
</rss>

