Select to view content in your preferred language

Sorting a query server-side?

386
0
12-01-2011 06:15 AM
AndrewLiles
Emerging Contributor
Hi all, I'm wondering if this is possible. I'm doing a query on a layer with hundreds of thousands of point features in it and showing attributes in a datagrid for further analysis/etc.

I'd like to implement some sort of paging mechanism that prevents the app from loading a large number of features to the client all at once. I know I can do a query for objectids that match a query (to bypass the service feature limit), and then load the attributes for any number of those at once using the Query.objectIds parameter.

The issue is that I'd like to have the objectids sorted by an attribute (a date field) prior to them being sent to the client, so when the client requests the next page of features, they get the ones that are sequentially next, if that makes sense.

I've thought about possibly building a separate ASP.net service that queries the SDE table directly and takes care of the sorting there, but I'm wondering if there is a pure-ESRI method of doing it. Perhaps a view can be created in the SDE database that orders correctly?
Tags (2)
0 Kudos
0 Replies