how can I get the joined table field name to query the layer,after layer,table joined

572
1
06-18-2013 12:50 AM
arct
by
New Contributor
Hi,

I am able to programmatically  join a layer and a table, the way suggest at "http://help.arcgis.com/en/sdk/10.0/vba_desktop/conceptualhelp/index.html#/How_to_join_a_table_to_a_l...".

I need to now programatically get only the rows that were joined. or the count of the rows only joined. ie. if the layer had a "CITYID" field  joined to "CID" field of the table. may be only 10 rows had the same "CITYID" as the table.

or how can I refer the "CID" after the join in the where clause of the layer query. If I use

featurePin.Fields.FindField("CITY.CID") it returns '-1' ie. the cfield does not exists.

how can I get the joined table field name  to query the layer, after the layer and table were join
ed programmatically(VBA)?

Thanks.
0 Kudos
1 Reply
AlexanderGray
Occasional Contributor III
You are missing the part where you show how you get the featurePin...  Are you getting it from IFeatureLayer.FeatureClass.search or from IGeoFeatureLayer.DisplayFeatureClass.Search?  The former includes only the fields in the base feature class, the latter includes the join fields as per the documentation.
0 Kudos