<?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 row.store throwing COMException: Error HRESULT E_FAIL in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/row-store-throwing-comexception-error-hresult-e/m-p/1560515#M12311</link>
    <description>&lt;P&gt;My attempt to set and save the geometry on a point layer is throwing the&amp;nbsp;COMException: Error HRESULT E_FAIL error on line 24, feat.Store().&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/145101"&gt;@CharlesMacleod&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/9021"&gt;@UmaHarano&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/42133"&gt;@GKmieliauskas&lt;/a&gt;&amp;nbsp;any ideas?&lt;/P&gt;&lt;P&gt;Full error message is below:&lt;/P&gt;&lt;P&gt;ArcGIS.Core.Data.Exceptions.GeodatabaseException: 'A geodatabase exception has occurred.'&lt;/P&gt;&lt;P&gt;COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var qf1 = new QueryFilter()
{
    SubFields = $"{acctFieldname},{siteFieldname},{grpFieldname},{shapeFieldname}",
};
using (var gdb = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(gdbPath))))
using (var iphFc = gdb.OpenDataset&amp;lt;FeatureClass&amp;gt;(IfpHTableName))
using (var cursor1 = iphFc.Search(qf1, false))
{
    while (cursor1.MoveNext())
    {
        using (var feat = cursor1.Current as Feature)
        {
            var shape = feat.GetShape();
            var acctValue = Convert.ToString(feat[acctFieldname]);
            var siteValue = Convert.ToString(feat[siteFieldname]);
            var grpValue = Convert.ToString(feat[grpFieldname]);
            var asgValue = $"{acctValue}_{siteValue}_{grpValue}";
            if (geocodedAsgsWshape.ContainsKey(asgValue))
            {
                var newShape = geocodedAsgsWshape[asgValue];
                if (!newShape.Equals(shape))
                {
                    feat.SetShape(geocodedAsgsWshape[asgValue]);
                    feat.Store();
                }
            }
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2024 22:10:12 GMT</pubDate>
    <dc:creator>MK13</dc:creator>
    <dc:date>2024-11-19T22:10:12Z</dc:date>
    <item>
      <title>row.store throwing COMException: Error HRESULT E_FAIL</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/row-store-throwing-comexception-error-hresult-e/m-p/1560515#M12311</link>
      <description>&lt;P&gt;My attempt to set and save the geometry on a point layer is throwing the&amp;nbsp;COMException: Error HRESULT E_FAIL error on line 24, feat.Store().&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/145101"&gt;@CharlesMacleod&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/9021"&gt;@UmaHarano&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/42133"&gt;@GKmieliauskas&lt;/a&gt;&amp;nbsp;any ideas?&lt;/P&gt;&lt;P&gt;Full error message is below:&lt;/P&gt;&lt;P&gt;ArcGIS.Core.Data.Exceptions.GeodatabaseException: 'A geodatabase exception has occurred.'&lt;/P&gt;&lt;P&gt;COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var qf1 = new QueryFilter()
{
    SubFields = $"{acctFieldname},{siteFieldname},{grpFieldname},{shapeFieldname}",
};
using (var gdb = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(gdbPath))))
using (var iphFc = gdb.OpenDataset&amp;lt;FeatureClass&amp;gt;(IfpHTableName))
using (var cursor1 = iphFc.Search(qf1, false))
{
    while (cursor1.MoveNext())
    {
        using (var feat = cursor1.Current as Feature)
        {
            var shape = feat.GetShape();
            var acctValue = Convert.ToString(feat[acctFieldname]);
            var siteValue = Convert.ToString(feat[siteFieldname]);
            var grpValue = Convert.ToString(feat[grpFieldname]);
            var asgValue = $"{acctValue}_{siteValue}_{grpValue}";
            if (geocodedAsgsWshape.ContainsKey(asgValue))
            {
                var newShape = geocodedAsgsWshape[asgValue];
                if (!newShape.Equals(shape))
                {
                    feat.SetShape(geocodedAsgsWshape[asgValue]);
                    feat.Store();
                }
            }
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 22:10:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/row-store-throwing-comexception-error-hresult-e/m-p/1560515#M12311</guid>
      <dc:creator>MK13</dc:creator>
      <dc:date>2024-11-19T22:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: row.store throwing COMException: Error HRESULT E_FAIL</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/row-store-throwing-comexception-error-hresult-e/m-p/1560781#M12312</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You could use &lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7606.html" target="_self"&gt;Row.Store&lt;/A&gt; method without EditOperation callback only in&amp;nbsp;OnRowChangedEvent implementation. More information &lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Editing#edit-operation-callback" target="_self"&gt;here&lt;/A&gt;. There are not so many cases which need Store using.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 16:06:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/row-store-throwing-comexception-error-hresult-e/m-p/1560781#M12312</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2024-11-20T16:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: row.store throwing COMException: Error HRESULT E_FAIL</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/row-store-throwing-comexception-error-hresult-e/m-p/1561014#M12323</link>
      <description>&lt;P&gt;The linked documentation states that you only need to utilise the edit operation callback when&amp;nbsp;&lt;SPAN&gt;performing edits that span both GIS and non-GIS data. I am only updating GIS data so I assumed that I don't need to use a callback.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 21:37:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/row-store-throwing-comexception-error-hresult-e/m-p/1561014#M12323</guid>
      <dc:creator>MK13</dc:creator>
      <dc:date>2024-11-20T21:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: row.store throwing COMException: Error HRESULT E_FAIL</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/row-store-throwing-comexception-error-hresult-e/m-p/1561128#M12324</link>
      <description>&lt;P&gt;I have checked all Esri Community samples. There are 3 cases of using Store method. First method using inside EditOperation callback. Second method uses Store inside &lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7093.html" target="_self"&gt;Geodatabase.ApplyEdits&lt;/A&gt; (sample &lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Geodatabase/MemoryGeodatabase" target="_self"&gt;MemoryGeodatabase&lt;/A&gt;). And third one as I wrote above is using Store in Row events without additional requirements (sample &lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Editing/ModifyNewlyAddedFeatures" target="_self"&gt;ModifyNewlyAddedFeatures&lt;/A&gt;). Rest of Store samples (6 from &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; use first method.&lt;/P&gt;
&lt;P&gt;I used Store method in my first add-ins, but now there is no Store usage in my code. It seems that is similar solution as in&amp;nbsp; ArcObjects but it works different.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 06:36:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/row-store-throwing-comexception-error-hresult-e/m-p/1561128#M12324</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2024-11-21T06:36:00Z</dc:date>
    </item>
  </channel>
</rss>

