AnsweredAssumed Answered

ArcObjects QueryDef PrefixClause - using 'TOP'

Question asked by MEINMEL on Oct 11, 2010
Latest reply on Oct 2, 2014 by Grieck
This is a .NET project and I am building a query definition and tried using 'TOP' in the PrefixClause, but it generates an error 'Invalid parameter value passed to function'. This is what my code looks like:

Dim queryFilterDef As IQueryDef2 = CType(_featureWorkspace.CreateQueryDef, IQueryDef2)
With queryFilterDef
   .WhereClause = searchString
   .PrefixClause = "TOP 1 " & featureClass.OIDFieldName
End With
Can TOP be used, and if so, what is the syntax?
My objective is just to determine that there is at least one record - I do not want records returned, or at least no more than one record.