ArcObjects Library Reference (GeoDatabase)  

IQueryFilter Interface

Provides access to members that filter data based on attribute values and or relationships.

Product Availability

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

Description

IQueryFilter filters data based on an attribute query. A string defining a where clause is required. An optional list of columns may be included to specify the column values to be retrieved. If no columns are specified, all values will be returned.

When To Use

When you need to filter data based on attribute values or the relationships between attributes.

Members

Description
Method AddField Appends a single field name to the list of sub-fields.
Read/write property OutputSpatialReference The spatial reference in which to output geometry for a given field.
Read/write property SubFields The comma delimited list of field names for the filter.
Read/write property WhereClause The where clause for the filter.

CoClasses that implement IQueryFilter

CoClasses and Classes Description
ImageQueryFilter (esriCarto) An image query filter.
QueryFilter ESRI Query Filter object.
SpatialFilter ESRI Spatial Filter object.
TemporalQueryFilter (esriTrackingAnalyst) Controls properties for the temporal query filter.
TimeQueryFilter (esriCarto) TimeQueryFilter Class

Remarks

Unlike the QueryDef object, QueryFilter objects are supported across all workspace types, including shapefiles and coverages.

For datasets that support it, an ORDER BY clause can be set on the attribute query by using the IQueryFilterDefinition::PostfixClause property.

See Also

IQueryDef Interface | esriSpatialRelEnum Constants | ISpatialFilter Interface

.NET Snippets

Create ExtractionOp Attribute Raster | Perform Attribute Query | Perform Spatial Query | Select Map Features by Attribute Query |

.NET Samples

ArcGIS GPConsole (Code Files: Program) | Calculate area geoprocessing function tool (Code Files: CalculateAreaFunction) | Closest facility application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: ClosestFacility_GISServerAPIClass) | Create a Mosaic dataset (Code Files: CreateMosaicDataset) | Executing geoprocessing tools in the background (Code Files: RunGPForm) | Extending the replication synchronization process (Code Files: RasterSyncWorkspaceExtension) | Implementing extended criteria for some predefined schematic rules (Code Files: PlantWithoutEquipment) | Import signposts (Code Files: SignpostUtilities) | Multivariate renderer (Code Files: MultivariateRenderer) | Route application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: Route_GISServerAPIClass) | Service area application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: ServiceArea_GISServerAPIClass) | StreetMap routing (Code Files: RoutingForm) | Using the traversal result to select source features (Code Files: SelectFeaturesTool) |

.NET Related Topics

Updating features | Adjusting feature locations with spatial adjustment | Converting simple data | Feature services | GeoData services | Geodatabase | Geodatabase API best practices | GeoDatabaseUI | Geometry | Geoprocessing services | How to access the features in an in-memory output layer using IFeatureCursor | How to create a selection set using a scatter plot graph | How to define and generate overviews on a Mosaic dataset | How to query an image service | Limiting query results and output | Performing map selection | Querying geodatabase tables | Releasing COM references | Server object extensions (SOE) | Sorting tables | Updating attributes of existing features | Utility COM objects | Working with field and selection |