The FeatureLayer represents water mains, Definition Queried by DATASET = ABANDONED.
Here is a sequence of step that lead to the issue:
1. Grab the search layer from the active map
2. Populate a list of field names from it using List<FieldDescription>. (I am absolutely making available the same field from the Definition Query to the user, which is "DATASET.")
3. User selects which field to search/select. Based on selected field, it is routed to an appropriate whereclause and fieldtype for conversion that sets up the actual feature selection.
4. DATASET = Abandoned is a CodedValueDomain. Fields with CodedValueDomains are sent to an IList<string> of codedvaluepairs.values, which are then selectable by the user.
5. Finally, a spatialqueryfilter is applied to a FeatureLayer Select().
If I do not SetDefinitionQuery(""); select() returns the exception: "geodatabasefieldexception," field does not exist or is inaccessible. *I get this exception when trying to select out of any fieldtype (string, integer, CodedValueDomain, etc.). *Seems none of the table fields are accessible through the Definition Query.
If I grab the DefinitionQuery before setting it to nothing, and re-instate it after the selection, the features are selected without the original DefinitionQuery, but show VISUALLY as you'd expect with the DefinitionQuery intact. (cheating). Not what I need.