<?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: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286959#M7427</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You guys rock.&amp;nbsp; Getting rid of IDataStatistics in our add-in saved us many hours of Arcmap re-installs.&amp;nbsp; I gave up trying to find the cause of our crashes until finding this thread. I would of never tracked it down myself.&amp;nbsp; Thank you for posting your findings.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Mar 2013 19:02:43 GMT</pubDate>
    <dc:creator>RobertHauck</dc:creator>
    <dc:date>2013-03-28T19:02:43Z</dc:date>
    <item>
      <title>Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286949#M7417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I currently have a case open with ESRI helping us to resolve this. I'm posting here because of the large amount of time it took to find this issue to help others. I have been experiencing a significant number of seemingly random crashes with ArcGIS 10.1 SP1. The issue has been narrowed down to IDataStatistics and IEnumerator (you must loop through the statistics with the enum to cause issue). Running statistics more than once (on different layers or the same layer) can cause a complete crash of ArcMap. It is random as to how many uses of IDataStatistics&amp;nbsp; will cause the crash, often three or four uses but sometimes as many as 100 which gives the error its random nature. It also causes strange issues with the UI, in the sample code the values are added to a list view which will suddenly switch to foreign characters. Errors we have received since updating to SP1 include System.AccessViolationException (Attempted to read write protected memory), 'FatalExecutionEngineError', 'Assert Failure' and �??ExecutionEngineException�?�. Tested on 32 and 64bit versions of Windows 7 and 32 bit XP&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tested the code without SP1 and it is fine. We have submitted this to ESRI UK and we are awaiting feedback.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Paste bin of the test code submitted to ESRI UK&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://pastebin.com/A4cuQc2u"&gt;http://pastebin.com/A4cuQc2u&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone else working with ArcObjects been receiving issues? I will post back when ESRI do&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 11:49:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286949#M7417</guid>
      <dc:creator>DavidWilton</dc:creator>
      <dc:date>2012-11-21T11:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286950#M7418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Read your code and i have some hints.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use FeatureClass.Search&amp;nbsp; with Cursor recycling&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Release object after use with ReleaseComObject rather then FinalRelease&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Releasing_COM_references/0001000004tm000000/"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Releasing_COM_references/0001000004tm000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you run a lot of iteration with enum without using Recycling you can waste a lot of memory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try this wit enclosing your loop in try catch and while running look monitor you system memory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry don't have time to do some testing on my side but will try to do that next week.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards, Dubravko&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 11:51:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286950#M7418</guid>
      <dc:creator>DubravkoAntonic</dc:creator>
      <dc:date>2012-11-22T11:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286951#M7419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dubravko,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks I tried both (recyling true and ReleaseComObject) and it still crashed. The code is in a try catch but the error is never caught. Also still getting very strange issues on the UI, notice all of the foreign characters in the image which are not in the data, none of which happened prior to SP1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]19477[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your suggestions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 12:03:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286951#M7419</guid>
      <dc:creator>DavidWilton</dc:creator>
      <dc:date>2012-11-22T12:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286952#M7420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dave, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tested your code and I'm sure that in ESRI imeplementation of IDataStatistics or in combination with IEnumerator is a memory leak. I separated AO logic from form object and after looping 10000 times in FeatureClass with 1500 features I had 300Mb RAM memory less. Isn't so bad if you do it once or twice but in some SOE implementation will be some nasty experience.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I run same loop with normal Cursor and there is no problem but you can make this analysis of unique value in Db or you can make your own implementation using System.Data.DataTable object or you can make your own and you'll be sure that you don't have this leaks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for bad news but same on my side. Hope ESRI will do something about it in a reasonable time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards, Dubravko&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 06:21:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286952#M7420</guid>
      <dc:creator>DubravkoAntonic</dc:creator>
      <dc:date>2012-11-26T06:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286953#M7421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;I'm sure that in ESRI imeplementation of IDataStatistics or in combination with IEnumerator is a memory leak. &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dubravko,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for checking that and confirming. Good call on separating out the UI from the project. I have a case open with ESRI and I'm sure this wasn't an issue before SP1 so hopefully they will recognise and resolve. It makes our application crash all the time as we rely heavily on IDataStatistics. As you say maybe I should look to create a work around.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 06:39:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286953#M7421</guid>
      <dc:creator>DavidWilton</dc:creator>
      <dc:date>2012-11-26T06:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286954#M7422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tested on ArcMap 10.0 SP4, WinXP.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need help about some implementation let me know on private, to help you in my spare , night :cool:, time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards Dubravko&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 06:53:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286954#M7422</guid>
      <dc:creator>DubravkoAntonic</dc:creator>
      <dc:date>2012-11-26T06:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286955#M7423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Seems I missed this post, other people are experiencing the same issue:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/70997-ICursor-issue-in-10.1-SP-1"&gt;http://forums.arcgis.com/threads/70997-ICursor-issue-in-10.1-SP-1&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 10:26:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286955#M7423</guid>
      <dc:creator>DavidWilton</dc:creator>
      <dc:date>2012-11-26T10:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286956#M7424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Esri inc have confirmed that there is a bug in 10.1 SP1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bug is NIM087476 �??Memory leakage ESRI.ArcGIS.Geodatabase.IDataStatistics using UniqueValues property with ArcGIS 10.1 with SP1�?�&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 08:02:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286956#M7424</guid>
      <dc:creator>DavidWilton</dc:creator>
      <dc:date>2012-12-19T08:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286957#M7425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried searching for this bug, but cannot find it. Where is it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 12:21:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286957#M7425</guid>
      <dc:creator>EricMcPhee</dc:creator>
      <dc:date>2012-12-20T12:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286958#M7426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I tried searching for this bug, but cannot find it. Where is it?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just asked ESRI the same question. Here is the response I got:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It will not show straight away. &lt;BR /&gt;&lt;BR /&gt;When a bug is raised it is only visible by the support team in the US initially and then once the development team that will actually fix the code has verified it then it will be marked to be visible by others.&lt;BR /&gt;&lt;BR /&gt;This can take varying amounts of time as if they are trying to investigate workarounds etc it may not be visible until they have finished the in-depth investigation.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 12:25:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286958#M7426</guid>
      <dc:creator>DavidWilton</dc:creator>
      <dc:date>2012-12-20T12:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286959#M7427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You guys rock.&amp;nbsp; Getting rid of IDataStatistics in our add-in saved us many hours of Arcmap re-installs.&amp;nbsp; I gave up trying to find the cause of our crashes until finding this thread. I would of never tracked it down myself.&amp;nbsp; Thank you for posting your findings.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 19:02:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286959#M7427</guid>
      <dc:creator>RobertHauck</dc:creator>
      <dc:date>2013-03-28T19:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286960#M7428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You guys rock.&amp;nbsp; Getting rid of IDataStatistics in our add-in saved us many hours of Arcmap re-installs.&amp;nbsp; I gave up trying to find the cause of our crashes until finding this thread. I would of never tracked it down myself.&amp;nbsp; Thank you for posting your findings.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks appreciate it. Did you see the other thread where I posted a helper so you don't have to remove the code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/70997-ICursor-issue-in-10.1-SP-1" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/threads/70997-ICursor-issue-in-10.1-SP-1&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 19:20:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286960#M7428</guid>
      <dc:creator>DavidWilton</dc:creator>
      <dc:date>2013-03-28T19:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286961#M7429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There is a good solution to this problem in the new IQueryFilterDefinition2 interface in 10.1.&amp;nbsp; I can confirm that this works for file geodatabases and performs well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IQueryFilter2 query = new QueryFilterClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.WhereClause = whereClause;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.SubFields = distinctColumn;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IQueryFilterDefinition2 queryDef = (IQueryFilterDefinition2)query;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string prefixTemplate = "DISTINCT {0}";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryDef.PrefixClause = String.Format(prefixTemplate, distinctColumn);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string postfixTemplate = "ORDER BY {0}";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryDef.PostfixClause = String.Format(postfixTemplate, distinctColumn);
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:52:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286961#M7429</guid>
      <dc:creator>PrestonMcCormick</dc:creator>
      <dc:date>2021-12-11T13:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286962#M7430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just for info, this IDatastatistics bug has been fixed in 10.2:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://downloads.esri.com/support/downloads/other_/102-IssuesAddressedList.pdf"&gt;http://downloads.esri.com/support/downloads/other_/102-IssuesAddressedList.pdf&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;NIM087476&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers, Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2013 08:22:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286962#M7430</guid>
      <dc:creator>RichardMarlow</dc:creator>
      <dc:date>2013-08-14T08:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ArcObjects and ArcGIS 10.1 SP1 IDataStatistics</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286963#M7431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;There is a good solution to this problem in the new IQueryFilterDefinition2 interface in 10.1.&amp;nbsp; I can confirm that this works for file geodatabases and performs well.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IQueryFilter2 query = new QueryFilterClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.WhereClause = whereClause;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.SubFields = distinctColumn;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IQueryFilterDefinition2 queryDef = (IQueryFilterDefinition2)query;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string prefixTemplate = "DISTINCT {0}";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryDef.PrefixClause = String.Format(prefixTemplate, distinctColumn);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string postfixTemplate = "ORDER BY {0}";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryDef.PostfixClause = String.Format(postfixTemplate, distinctColumn);
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; This code sample doesn't quite work for me when I covert it to VB .NET. The problem is with these lines:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string prefixTemplate = "DISTINCT {0}";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryDef.PrefixClause = String.Format(prefixTemplate, distinctColumn);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; It puts the unique field name after the distinct clause, but that field name is already being fed in the SQL statement being run by the SubFields setting. Setting the prefix to just "DISTINCT" seems to work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:52:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issues-with-arcobjects-and-arcgis-10-1-sp1/m-p/286963#M7431</guid>
      <dc:creator>AllanMills</dc:creator>
      <dc:date>2021-12-11T13:52:20Z</dc:date>
    </item>
  </channel>
</rss>

