Newbie in ArcObjects programming. Using C#. Developing a desktop application.
I need to join 2 tables:
- POI layer which is a Point layer and
- a parcel layer which is a Polygon
POI.HouseNo = Parcel.UNIT_ID
and then create a new Shapefile which has only the 4 fields:
- HouseNo (all from POI layer attributes),
- ParcelName (all from Parcel Layer attributes).
The user selects the POI Layer and the Parcel layer from combo boxes.
Here is the code I have written so far:
IFeatureWorkspace featureWorkspace; IQueryDef queryDef = featureWorkspace.CreateQueryDef(); queryDef.Tables = cboPOI.Text + "," + cboParcel.Text; queryDef.SubFields = cboPOI.Text + ".Name," + cboPOI.Text + ".Type," + cboPOI.Text +".HouseNo," + cboParcel.Text + ".ParcelName"; queryDef.WhereClause = cboPOI.Text + ".HouseNo =" + cboParcel.Text+ ".UNIT_ID";
Hope I'm on the right track. Now I need to run this query and get the output to a new Shapefile. How can I do this?