No records are returned when querying a shapefile using the WHERE attribute imbedded in the SPATIALQUERY or QUERY XML tags.
<GET_FEATURES outputmode="xml" geometry="false" envelope="false" compact="true">
<LAYER id="0" />
<QUERY subfields="#ALL#" where="sfield='Value 1'">
<FEATURECOUNT count="0" hasmore="false" />
The Spatial Server is unable to process the query because either the shapefile attribute table does not contain an ID field, or the shapefile has an ID field but it is not populated with numeric values.
Make sure the shapefile attribute table contains a number field with the name ID and that the field is populated with unique numeric values. Refer to the article in the Related Information section below for instructions on how to create a new number field and populate it with unique values.
Refresh the MapService after editing the shapefile.