Select to view content in your preferred language

IQueryFilter.Subfields does not work.

634
2
06-30-2010 01:33 PM
ESRICustomer
Occasional Contributor
Language: VB.NET
ArcObjects version: 9.3.x

How come when I do this...

QueryFilter.SubFields = ""
QueryFilter.AddField(SomeFieldName)

And then this...

Debug.Print QueryFilter.SubFields

I get this retarded output...

"*"
Which to me, and according to the help, illustrates that Subfields just ignores whatever you do and doesn't work.
0 Kudos
2 Replies
KirkKuykendall
Deactivated User
try this:

QueryFilter.SubFields = "FieldA"
QueryFilter.AddField("FieldB")
0 Kudos
NeilClemmons
Honored Contributor
The SubFields property and AddField method work as documented.  The SubFields property is a comma-delimited list of field names which is set to "*" by default.  "*" is standard SQL for all fields.  AddField adds a field name to this list.  If you call AddField when SubFields is set to "*", then it does nothing because adding a field to the list when it's already set for all fields would be redundant.  If you set the SubFields property to a single field name or a comma-delimited list of field names, then call AddField, it will add that field to the list (see Kirk's example above).
0 Kudos