<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ArcObjects QueryDef PrefixClause - using 'TOP' in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473059#M12784</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Meinmel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;why dont you use ITable.RowCount method to get the number of records?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Oct 2010 18:17:32 GMT</pubDate>
    <dc:creator>ThavitinaiduGulivindala</dc:creator>
    <dc:date>2010-10-11T18:17:32Z</dc:date>
    <item>
      <title>ArcObjects QueryDef PrefixClause - using 'TOP'</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473058#M12783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;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:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim queryFilterDef As IQueryDef2 = CType(_featureWorkspace.CreateQueryDef, IQueryDef2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With queryFilterDef&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; .WhereClause = searchString&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; .PrefixClause = "TOP 1 " &amp;amp; featureClass.OIDFieldName&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End With&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can TOP be used, and if so, what is the syntax?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Oct 2010 17:00:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473058#M12783</guid>
      <dc:creator>MelodyMeinhardt</dc:creator>
      <dc:date>2010-10-11T17:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects QueryDef PrefixClause - using 'TOP'</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473059#M12784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Meinmel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;why dont you use ITable.RowCount method to get the number of records?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Oct 2010 18:17:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473059#M12784</guid>
      <dc:creator>ThavitinaiduGulivindala</dc:creator>
      <dc:date>2010-10-11T18:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects QueryDef PrefixClause - using 'TOP'</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473060#M12785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the response!&amp;nbsp; I don't want the number of records in the table, I want to know if any records exist with the search criteria that is entered.&amp;nbsp; For example, I want to know if there are any businesses with a name like '% RIVER%'.&amp;nbsp; I don't want how many records meet that criteria, I just want to know if at least one record meets that criteria.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Oct 2010 18:21:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473060#M12785</guid>
      <dc:creator>MelodyMeinhardt</dc:creator>
      <dc:date>2010-10-11T18:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects QueryDef PrefixClause - using 'TOP'</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473061#M12786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What data source are you using (File Geodatabase, ArcSDE(Oracle, Informix, SQL Server, DB2, PostgreSQL), Personal Geodatabase or ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Oct 2010 18:23:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473061#M12786</guid>
      <dc:creator>LanceShipman</dc:creator>
      <dc:date>2010-10-11T18:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects QueryDef PrefixClause - using 'TOP'</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473062#M12787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using ArcSDE/sql express right now.&amp;nbsp; We also have some data in a file geodatabase where I have the same needs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Oct 2010 18:27:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473062#M12787</guid>
      <dc:creator>MelodyMeinhardt</dc:creator>
      <dc:date>2010-10-11T18:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects QueryDef PrefixClause - using 'TOP'</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473063#M12788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am using ArcSDE/sql express right now.&amp;nbsp; We also have some data in a file geodatabase where I have the same needs.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TOP will not work with File Geodatabase as it's not part of the current SQL implementation. In preliminary testing using top as PrefixClause does not appear to work for SQL Server. I need to do some more testing to see if it's a bug. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could just use IFeature.FeatureCount to see is any rows will be returned by your query.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Oct 2010 18:55:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473063#M12788</guid>
      <dc:creator>LanceShipman</dc:creator>
      <dc:date>2010-10-11T18:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects QueryDef PrefixClause - using 'TOP'</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473064#M12789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, thanks, I will give that a try.&amp;nbsp; I was trying to find a way to code it that was faster then what I'm seeing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Oct 2010 18:58:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473064#M12789</guid>
      <dc:creator>MelodyMeinhardt</dc:creator>
      <dc:date>2010-10-11T18:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects QueryDef PrefixClause - using 'TOP'</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473065#M12790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FYI ITable.RowCount does take an IQueryFilter as a parameter. You could pass your query and determine the number of rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#/RowCount_Method/0025000008p3000000/" title="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#/RowCount_Method/0025000008p3000000/"&gt;ArcObjects Help for .NET developers&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 20:58:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-querydef-prefixclause-using-top/m-p/473065#M12790</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2014-10-02T20:58:17Z</dc:date>
    </item>
  </channel>
</rss>

