ArcObjects Library Reference (GeoDatabase)  

IQueryFilter.SubFields Property

The comma delimited list of field names for the filter.

[Visual Basic .NET]
Public Property SubFields As String
[C#]
public string SubFields {get; set;}
[C++]
HRESULT get_SubFields(
  BSTR* SubFields
);
[C++]
HRESULT put_SubFields(
  BSTR SubFields
);
[C++]

Parameters

SubFields [out, retval]   SubFields is a parameter of type BSTR SubFields [in]   SubFields is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

You can use the SubFields property to improve performance when using query filters. The performance gain comes from just fetching the field values that you require rather than all the data for each row. The default value for SubFields is "*", which indicates that all field values will be returned. Setting it back to this original (default) "*" can be done either by setting it to "*" or to "".

The SubFields property should be a comma-delimited list of the columns that are required. For example, to retrieve two fields named "OBJECTID" and "NAME", the property should be set to "OBJECTID, NAME" (the space is optional).

It isn’t necessary to set the subfields when the query filter is used in a context in which no attribute values are fetched, for example, when selecting features.

Remarks

When accessing rows from a subset of data defined by a query filter, all the fields will be present, but just those specified by SubFields will be populated with values. This ensures that the field index positions for an object remain constant no matter how it was hydrated.

When editing data, always use "*" for the SubFields property.

See Also

IQueryFilter Interface

.NET Samples

Multivariate renderer (Code Files: MultivariateRenderer)

.NET Related Topics

Converting simple data | Executing spatial queries | Querying geodatabase tables | Updating attributes of existing features