Query a shapefile


Purpose
This sample demonstrates how to open a cursor on a shapefile and print the value of each field for all the records in the shapefile. It uses the following information:
  • input.data.path—Location to an input dataset
  • input.data.name—Name of the input dataset

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. Start Visual Studio.
  2. Run the application. Results appear in the console window.


Download the files for Java
geodatabase/QueryShapefile.java Main class.




Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS for Desktop Basic