I am running querymain.aspx and the user can select a column from a drop down list to show in the results window along with OID (SQL Server ID). The results that are shown are sorted by OID. Can the results be sorted by second column that the user selects?
This gets a bit tricky because you now have to query the capabilities XML of the underlying feature source and you have to look in the capabilities XML for a particular element (I believe it's <SupportsSelectOrdering>true</SupportsSelectOrdering>)
If you find this element, it means the FDO provider for that feature source says ordering is supported, then it is safe to call SetOrderingFilter() in the MgFeatureQueryOptions.
Also ideally from a safety standpoint, your sort ordering field in your UI should be enabled/disabled based on this capability check, to prevent illegal user actions like specifying sort ordering on a Feature Source that does not support ordering.