Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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()
share|improve this question
1  
Raj, Try your where clause without Districts.statename enclosed within the double quotes. –  artwork21 Apr 8 '13 at 11:44
    
Thanks artwork21,but it is not working. –  Raj Apr 9 '13 at 8:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.