Select features using query


Purpose
This sample demonstrates how to use a MapControl to display selected features in a feature layer. Features are selected programmatically based on a user-supplied where clause and the IQueryFilter interface.

How to use

See How to use ArcGIS samples for help on running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Run the SelectFeaturesUsingQuery application.
  2. Click Add Layer and browse to a feature layer to add to the map.
  3. Enter text for the where clause (for example, AREA > 1000).
  4. Click Select Features to select features based on the where clause. The selected features are highlighted on the map.


Download the files for Java
mapbean/SelectFeaturesUsingQuery.java Main class




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime
ArcView
ArcEditor
ArcInfo