<?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 How to get database constraint violation error using EditOperation in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-database-constraint-violation-error/m-p/782849#M1189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am writing a feature to an Oracle Enterprise Geodatabase using an edit operation:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; editOperation &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;EditOperation&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// Assign shape and attributes&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; attributes &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Dictionary&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;object&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;shapeFieldName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; shape&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"myField"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"myField"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// Create new feature                &lt;/SPAN&gt;
editOperation&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Create&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featClass&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; attributes&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;bool&lt;/SPAN&gt; succeeded &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; editOperation&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Execute&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When executing the editOperation fails, I have no information what went wrong, i.e. if I violated a unique key constraint. Is there a possibilty to get the error? Or is there a better way to write features to an Enterprise Geodatabase?&lt;/P&gt;&lt;P&gt;Thanks, Barbara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 08:55:13 GMT</pubDate>
    <dc:creator>BarbaraSchneider2</dc:creator>
    <dc:date>2021-12-12T08:55:13Z</dc:date>
    <item>
      <title>How to get database constraint violation error using EditOperation</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-database-constraint-violation-error/m-p/782849#M1189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am writing a feature to an Oracle Enterprise Geodatabase using an edit operation:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; editOperation &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;EditOperation&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// Assign shape and attributes&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; attributes &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Dictionary&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;object&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;shapeFieldName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; shape&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"myField"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"myField"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// Create new feature                &lt;/SPAN&gt;
editOperation&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Create&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featClass&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; attributes&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;bool&lt;/SPAN&gt; succeeded &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; editOperation&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Execute&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When executing the editOperation fails, I have no information what went wrong, i.e. if I violated a unique key constraint. Is there a possibilty to get the error? Or is there a better way to write features to an Enterprise Geodatabase?&lt;/P&gt;&lt;P&gt;Thanks, Barbara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:55:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-database-constraint-violation-error/m-p/782849#M1189</guid>
      <dc:creator>BarbaraSchneider2</dc:creator>
      <dc:date>2021-12-12T08:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to get database constraint violation error using EditOperation</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-database-constraint-violation-error/m-p/782850#M1190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barbara,&lt;/P&gt;&lt;P&gt;If the EditOperation fails, the property EditOperation.ErrorMessage may contain the cause if known.&lt;/P&gt;&lt;P&gt;Otherwise you can enable an Oracle TRACE in the database to get detailed information from that side.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2020 16:40:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-database-constraint-violation-error/m-p/782850#M1190</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-03-13T16:40:02Z</dc:date>
    </item>
  </channel>
</rss>

