Newbie in arcobject 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) where POI.HouseNo=Parcel.UNIT_ID and then create a new shape file which has only the 4 fields POIName,POIType,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 shape file. How can I do this?