Select to view content in your preferred language

QueryTask - Finding Attribute field types

657
1
12-06-2010 09:09 AM
PaulLeedham
Deactivated User
I would like to know if there is a more elegant way of finding the attribute field types when using a QueryTask.  The problem we are having is that if the feature layer is dynamic, we do not know the field types within the layer on the server--we basically have to return all 500 records with a query such as SELECT * From Dataset Where OBJECTID > 0.  Is there a method where we can SELECT Top 1 from dataset, or something similar?
Thanks,
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
The REST API does not support this type of query. Only the following parameters may be provided (even for 10.01) http://services.arcgisonline.com/ArcGIS/SDK/REST/query.html.

You would have to use LINQ query to narrow the results in the ExecuteCompleted or simply retrieve the first feature and ignore the rest of the results.
0 Kudos