<?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 ArcObjects 10.4 and 10.4.1 Selecting Features .NET in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-10-4-and-10-4-1-selecting-features-net/m-p/730059#M19449</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I have been using ArcObjects since version 10.0 and have&amp;nbsp;been using the same code that is listed in the "Select Map Features by Attribute Query" snippet that comes with the&amp;nbsp;ArcObjects SDK. &amp;nbsp;Attached is the snippet from the SDK. On the call to&amp;nbsp;SelectFeatures(queryFilter, ESRI.ArcGIS.Carto.esriSelectionResultEnum.esriSelectionResultNew, False), I get the following error:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;This works with previous versions 10.0, 10.1, 10.2. &amp;nbsp;What is going on? &amp;nbsp;How do I fix this? &amp;nbsp;If additional information is required, feel free to reply.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Additional notes:&lt;/P&gt;&lt;OL style="border: 0px; padding: 0px 0px 0px 30px;"&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;This happens with multiple map files (mxd with mdb or shape files)&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;All map files work in previous version of ArcObjects (10.0-3)&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;The query is correct and verified to work within ArcMap itself.&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;The query is simple in that it queries one field for one value. &amp;nbsp;eg. MyID = 'A3-19' (Note: The field can be text or numeric and the results are the same)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Aug 2016 18:58:38 GMT</pubDate>
    <dc:creator>JPGrusling</dc:creator>
    <dc:date>2016-08-19T18:58:38Z</dc:date>
    <item>
      <title>ArcObjects 10.4 and 10.4.1 Selecting Features .NET</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-10-4-and-10-4-1-selecting-features-net/m-p/730059#M19449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I have been using ArcObjects since version 10.0 and have&amp;nbsp;been using the same code that is listed in the "Select Map Features by Attribute Query" snippet that comes with the&amp;nbsp;ArcObjects SDK. &amp;nbsp;Attached is the snippet from the SDK. On the call to&amp;nbsp;SelectFeatures(queryFilter, ESRI.ArcGIS.Carto.esriSelectionResultEnum.esriSelectionResultNew, False), I get the following error:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;This works with previous versions 10.0, 10.1, 10.2. &amp;nbsp;What is going on? &amp;nbsp;How do I fix this? &amp;nbsp;If additional information is required, feel free to reply.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Additional notes:&lt;/P&gt;&lt;OL style="border: 0px; padding: 0px 0px 0px 30px;"&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;This happens with multiple map files (mxd with mdb or shape files)&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;All map files work in previous version of ArcObjects (10.0-3)&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;The query is correct and verified to work within ArcMap itself.&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;The query is simple in that it queries one field for one value. &amp;nbsp;eg. MyID = 'A3-19' (Note: The field can be text or numeric and the results are the same)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 18:58:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-10-4-and-10-4-1-selecting-features-net/m-p/730059#M19449</guid>
      <dc:creator>JPGrusling</dc:creator>
      <dc:date>2016-08-19T18:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects 10.4 and 10.4.1 Selecting Features .NET</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-10-4-and-10-4-1-selecting-features-net/m-p/730060#M19450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/people/jpgrusling"&gt;jpgrusling&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an existing BUG.&amp;nbsp;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;"&gt; [BUG-000097730: The QueryFilter does not function, and errors are returned for methods that require IQueryFilter parameters, such as IFeatureClass.Search, IFeatureSelection.SelectFeatures, and so on, in external ArcObjects applications that access ArcMap using the IAppROT interface.]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And below is the workaround for the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;"&gt;Use IObjectFactory.Create to create the QueryFilter object instead of the new keyword to ensure the QueryFilter functions as expected from external applications, as shown in the following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;"&gt;IQueryFilter pQF = new QueryFilter();&lt;/SPAN&gt;&lt;BR clear="none" style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;" /&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;"&gt;string classID = pQF.GetType().GUID.ToString("B");&lt;/SPAN&gt;&lt;BR clear="none" style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;" /&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;"&gt;/// appRot application space&lt;/SPAN&gt;&lt;BR clear="none" style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;" /&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;"&gt;IObjectFactory objectFactory = (IObjectFactory)pAPP;&lt;/SPAN&gt;&lt;BR clear="none" style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;" /&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;"&gt;pQF = (IQueryFilter)objectFactory.Create(classID);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;"&gt;For more information about this workaround, refer to the document at&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#56eba175-54c1-46b4-801a-fc968e582581.htm" shape="rect" style="color: #006cb5; background-color: #ffffff; font-size: 13.3333px;" target="_blank"&gt;http://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#56eba175-54c1-46b4-801a-fc968e582581.htm&lt;/A&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 13.3333px;"&gt;Alif&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2016 16:59:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-10-4-and-10-4-1-selecting-features-net/m-p/730060#M19450</guid>
      <dc:creator>AlifShaikh1</dc:creator>
      <dc:date>2016-08-26T16:59:37Z</dc:date>
    </item>
  </channel>
</rss>

