I am trying to query a ArcSDE Feature Class after joining using Iqueryfilter
I have two SDE feature classes. 1) Subdivisions : which has details of subdivision and districts (parent)
2) Districts: Which has details of districts and States (parent)
I want to find out what are the subdivisions in a state. For this I joined Districts table to Subdivision table and now I can do attribute query in ArcMap and get the divisions in a state using select by attribute tool (example : Districts.statename = 'A' selects all the divisions in the state ‘A’)
Now I want to do the same using VBA - I am using the following method but it gives me ORA-00904 error : “Districts”.”statename” : invalid identifier.
Anybody have faced same type of issue erliar? What is best way to get this done. Thank you in advance.
Dim pQFilter As IQueryFilter Set pQFilter = New QueryFilter Dim pFeature As IFeature pQFilter.WhereClause = " Districts.statename = 'A'" Dim myFeatureLayer As IFeatureLayer Set myFeatureLayer = “Districts” Dim pFCursor As IFeatureCursor Set pFCursor = myFeatureLayer.Search(pQFilter, False) Set pFeature = pFCursor.NextFeature()