jason53220

IQueryFilterDefinition2 Bug?

Discussion created by jason53220 on Oct 28, 2013
I am running into an issue with the IQueryFilterDefinition2 interface.  Here is what I am seeing.  The PrefixClause works perfectly until I start an edit session.  I can execute the query against a table, not a feature class, and get the value of DOCUMENTYPE from the row.  Once I begin editing, the value of DOCUMENTYPE is null.  I stop editing, run the query again, and it works.  Additionally, the query is returning all of the records, so it is bacisally ignoring the DISTINCT prefic clause.

Dim queryFilter As IQueryFilter = New QueryFilter()
queryFilter.SubFields = "DOCUMENTTYPE"

Dim queryDefinition As IQueryFilterDefinition2 = CType(queryFilter, IQueryFilterDefinition2)
queryDefinition.PrefixClause = "DISTINCT"

Outcomes