Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to get all field names present in a feature class using queryfilter programmatically.

share|improve this question
What methods have you tried, how far did you get, and where specifically do you need help? – whuber Aug 13 '12 at 14:05
Thanks whuber.....i used query filter to get selected field names.....pQueryFilter.SubFields = "city_population,city_id"....but i want all the field names without passing them within quotes( " ")....any help ! – Navish Aug 14 '12 at 3:53
Presumably this is for ArcGIS, right? (It's a good idea to put these details in the question itself.) – whuber Aug 14 '12 at 11:55
Yes,featureclasses are stored in a pgdb.... – Navish Aug 16 '12 at 3:39
If you want all fields, just specify "*" as the IQueryFilter.SubFields property. Otherwise, you can access the list of fields through IFeatureClass.Fields. – Petr Krebs Aug 16 '12 at 20:31

ESRI has excellent documentation for everything. With a quick search you would most probably get what you want. Below snippet is slightly modified version copied from there

Public Sub DisplayDistinctFieldAliasNames(ByVal featureClass As IFeatureClass)
        Dim fields As IFields = featureClass.Fields
        Dim field As IField = Nothing

    For i As Integer = 0 To fields.FieldCount - 1
        field = fields.Field(i)
    Next i
End Sub
share|improve this answer
"ESRI has excellent documentation for everything" -- not sure if serious. – blah238 Aug 16 '12 at 18:33
@blah238 - at least for the desktop SDK, its god :-) – vinayan Aug 17 '12 at 0:53

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.