I've been messing with the ExecuteQuery function and I don't seem to be getting correct values returned.
For example, I have a shapefilefeaturelayer named earthquakes and I try to perform the following query on it using the below:
string CommandText = "Select * from earthquakes where LOCATION LIKE ('n%')";
DataTable features = (SelectedLayer as ShapeFileFeatureLayer).QueryTools.ExecuteQuery(CommandText);
This should return all of the features that have a location attribute starting with 'n', which is multiples. But only one is returned.
earthquakes.zip (319.6 KB)
I've attached the shapefile above.
Edit: Another query not returning the correct stuff I found is:
"Select * from earthquakes where OBJECTID <> 1"
Instead of returning all the features where objectid != 1, it returns the first feature that has objectid = 1, and returns the rest except the very last feature. I've tested with various values and get the same result.
"Select * from earthquakes where OBJECTID >= 5400"
returns the first 25 features, which all have OBJECTID < 5400, instead of features where the OBJECTID is >= 5400.