warpengine

Query a shapefile with ordered results

Discussion created by warpengine on Feb 21, 2014
Latest reply on Feb 24, 2014 by warpengine
In VB2010 I am using the IQueryFilter interface to hit a shapefile and get back some records. It works great but am having trouble figuring out how to get results back in an order as input by the user. They input airports in a listbox and I take that and create a where clause out of it. By default the recordset returned is in alphabetical order which will not work here as the user needs the results back in the order they input.

            Dim pQryFltr As IQueryFilter = New QueryFilter
            pQryFltr.WhereClause = "APT LIKE 'DFW' OR APT LIKE 'STL' OR APT LIKE 'ORD'"

results come back as

DFW
ORD
STL

I am trying to figure out how I can return the results in an order that is equivalent to how the user input the data. Is that even possible?

~AGP

Outcomes