<?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 Why InsertCursor does not work in an enterprise geodatabse? in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/why-insertcursor-does-not-work-in-an-enterprise/m-p/795098#M2323</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #cc7832;"&gt;from &lt;/SPAN&gt;vrbls &lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;*

arcpy.env.workspace = database
workspace = arcpy.env.workspace
arcpy.env.overwriteOutput = &lt;SPAN style="color: #cc7832;"&gt;True
&lt;/SPAN&gt;edit = arcpy.da.Editor(workspace)

edit.startEditing(&lt;SPAN style="color: #cc7832;"&gt;False, True&lt;/SPAN&gt;)
edit.startOperation()
insert_cursor = arcpy.da.InsertCursor(perm_bound&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;[&lt;SPAN style="color: #6a8759;"&gt;"PermitNo"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"FeatCLS"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Contact"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Source"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                                   &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"National_ID"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Type_Flag"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Calc_Acres"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;'SHAPE@'&lt;/SPAN&gt;])
&lt;SPAN style="color: #cc7832;"&gt;with &lt;/SPAN&gt;arcpy.da.SearchCursor(perm_bound_file_geodb&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;[&lt;SPAN style="color: #6a8759;"&gt;"PermitNo"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"FeatCLS"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Contact"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Source"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"National_ID"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                                   &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Type_Flag"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Calc_Acres"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;'SHAPE@'&lt;/SPAN&gt;]) &lt;SPAN style="color: #cc7832;"&gt;as &lt;/SPAN&gt;cursor:
    &lt;SPAN style="color: #cc7832;"&gt;for &lt;/SPAN&gt;row &lt;SPAN style="color: #cc7832;"&gt;in &lt;/SPAN&gt;cursor:
        insert_cursor.insertRow(row)
        &lt;SPAN style="color: #8888c6;"&gt;print&lt;/SPAN&gt;(&lt;SPAN style="color: #6a8759;"&gt;'row inserted'&lt;/SPAN&gt;)

    &lt;SPAN style="color: #cc7832;"&gt;del &lt;/SPAN&gt;cursor
&lt;SPAN style="color: #cc7832;"&gt;del &lt;/SPAN&gt;insert_cursor
edit.startEditing(&lt;SPAN style="color: #cc7832;"&gt;False, True&lt;/SPAN&gt;)
edit.startOperation()&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not have any problem using this code in a file geodatabase and it works fine. It does not work inside an enterprise geodatabase and does not insert any rows yet I do not get any error and it exits with zero code.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 09:10:35 GMT</pubDate>
    <dc:creator>Amadeus111</dc:creator>
    <dc:date>2021-12-12T09:10:35Z</dc:date>
    <item>
      <title>Why InsertCursor does not work in an enterprise geodatabse?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/why-insertcursor-does-not-work-in-an-enterprise/m-p/795098#M2323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #cc7832;"&gt;from &lt;/SPAN&gt;vrbls &lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;*

arcpy.env.workspace = database
workspace = arcpy.env.workspace
arcpy.env.overwriteOutput = &lt;SPAN style="color: #cc7832;"&gt;True
&lt;/SPAN&gt;edit = arcpy.da.Editor(workspace)

edit.startEditing(&lt;SPAN style="color: #cc7832;"&gt;False, True&lt;/SPAN&gt;)
edit.startOperation()
insert_cursor = arcpy.da.InsertCursor(perm_bound&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;[&lt;SPAN style="color: #6a8759;"&gt;"PermitNo"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"FeatCLS"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Contact"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Source"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                                   &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"National_ID"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Type_Flag"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Calc_Acres"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;'SHAPE@'&lt;/SPAN&gt;])
&lt;SPAN style="color: #cc7832;"&gt;with &lt;/SPAN&gt;arcpy.da.SearchCursor(perm_bound_file_geodb&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;[&lt;SPAN style="color: #6a8759;"&gt;"PermitNo"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"FeatCLS"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Contact"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Source"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"National_ID"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                                                   &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Type_Flag"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Calc_Acres"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;'SHAPE@'&lt;/SPAN&gt;]) &lt;SPAN style="color: #cc7832;"&gt;as &lt;/SPAN&gt;cursor:
    &lt;SPAN style="color: #cc7832;"&gt;for &lt;/SPAN&gt;row &lt;SPAN style="color: #cc7832;"&gt;in &lt;/SPAN&gt;cursor:
        insert_cursor.insertRow(row)
        &lt;SPAN style="color: #8888c6;"&gt;print&lt;/SPAN&gt;(&lt;SPAN style="color: #6a8759;"&gt;'row inserted'&lt;/SPAN&gt;)

    &lt;SPAN style="color: #cc7832;"&gt;del &lt;/SPAN&gt;cursor
&lt;SPAN style="color: #cc7832;"&gt;del &lt;/SPAN&gt;insert_cursor
edit.startEditing(&lt;SPAN style="color: #cc7832;"&gt;False, True&lt;/SPAN&gt;)
edit.startOperation()&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not have any problem using this code in a file geodatabase and it works fine. It does not work inside an enterprise geodatabase and does not insert any rows yet I do not get any error and it exits with zero code.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:10:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/why-insertcursor-does-not-work-in-an-enterprise/m-p/795098#M2323</guid>
      <dc:creator>Amadeus111</dc:creator>
      <dc:date>2021-12-12T09:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why InsertCursor does not work in an enterprise geodatabse?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/why-insertcursor-does-not-work-in-an-enterprise/m-p/795099#M2324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does your user have the correct permissions on that feature class on the egdb?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Nov 2020 14:36:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/why-insertcursor-does-not-work-in-an-enterprise/m-p/795099#M2324</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2020-11-01T14:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why InsertCursor does not work in an enterprise geodatabse?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/why-insertcursor-does-not-work-in-an-enterprise/m-p/795100#M2325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Joe-Borgione Thank you for your answer. I have DBO and Admin credentials I am the one who run the scripts. I use the Admin connection on the data will be updated.&lt;/P&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9.8pt;"&gt;database = &lt;SPAN style="color: #6a8759;"&gt;r'\\nrdsmnt6\mine maps\DMP_Database\ShapefileProcessing_SupportFiles\Connection_DMP_Admin.sde'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Should I do something else? I can not use append tool here because there are read locks and I am unable to remove locks to switch "unregister as versioned".&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Nov 2020 15:05:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/why-insertcursor-does-not-work-in-an-enterprise/m-p/795100#M2325</guid>
      <dc:creator>Amadeus111</dc:creator>
      <dc:date>2020-11-01T15:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why InsertCursor does not work in an enterprise geodatabse?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/why-insertcursor-does-not-work-in-an-enterprise/m-p/795101#M2326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the EGDB versioned? Where is stopOperation() and stopEditing(True)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you may have luck with&amp;nbsp;edit.startEditing(False, False)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Nov 2020 15:14:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/why-insertcursor-does-not-work-in-an-enterprise/m-p/795101#M2326</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-11-01T15:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why InsertCursor does not work in an enterprise geodatabse?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/why-insertcursor-does-not-work-in-an-enterprise/m-p/795102#M2327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot @David-Pike, I copied and pasted the wrong lines. duh! exactly,&amp;nbsp;where&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;is stopOperation() and stopEditing(True)&lt;/SPAN&gt; I did not even notice I did not stop editing. That was the problem.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Nov 2020 15:28:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/why-insertcursor-does-not-work-in-an-enterprise/m-p/795102#M2327</guid>
      <dc:creator>Amadeus111</dc:creator>
      <dc:date>2020-11-01T15:28:10Z</dc:date>
    </item>
  </channel>
</rss>

