Set QueryParameters.MaxFeatures and catch a exception

999
3
06-06-2017 07:03 PM
xiaoguangyan
New Contributor III

When I set QueryParameters.MaxFeatures  execute query then will catch a exception(Unable to complete operation.), but don't set it codes go well

Tags (1)
0 Kudos
3 Replies
xiaoguangyan
New Contributor III

I notice that some featureserver with different  Advanced Query Capabilities,some having all the Advanced Query Capabilities true supports can ServiceFeatureTable.QueryFeaturesAsync(QueryParameters parameters, QueryFeatureFields queryFeatureFields) with setting QueryParameters.MaxFeatures , does this Advanced Query Capabilities matters?

0 Kudos
JenniferNery
Esri Regular Contributor

Is `NAME` a field name in the service? If you use a name that does not exist on server you will get the same error:

For example, when if I mistyped with `NAM` for `NAME`: http://sampleserver6.arcgisonline.com/arcgis/rest/services/Notes/FeatureServer/0/query?where=NAM+LIK...

FeatureTable.Fields should be able to give you the name to use in your query, it includes the same metadata found on server (i.e. FieldType, Name, Alias, IsEditable, etc).

0 Kudos
xiaoguangyan
New Contributor III

Hi Jennifer 

I do have the field "Name", I checked and  i did't mistyped either

Thanks for your detail reply

0 Kudos