<?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: ArcSDE FeatureClass update with edit session problems in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693738#M53812</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is your data versioned?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Nov 2013 22:05:42 GMT</pubDate>
    <dc:creator>MattSayler</dc:creator>
    <dc:date>2013-11-07T22:05:42Z</dc:date>
    <item>
      <title>ArcSDE FeatureClass update with edit session problems</title>
      <link>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693737#M53811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to run an update on an ArcSDE FeatureClass using ArcPy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With the goal of my code starting an edit session, making a change to my FC and then saving the changes, so this change will show up in the (date_Changed) attribute like ArcSDE is supposed to. This is my code below: (Just an example of trying to use the insertcursor, normally I would try to deletefeatures then append, but I figured start small first)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;

import arcpy
from arcpy import env
arcpy.MakeFeatureLayer_management(r'Database Connections\GISAdmin@SBMPERDBS003.sde\GISAdmin.Leonora_Drilling\GISAdmin.LEO_DH_Collars','LeoDHCollars')
arcpy.MakeXYEventLayer_management(r'\\SBMPERTST001\Applications\GIS\DataShed Exploration_LEO Export\Arc_DHCollars.csv',"NAT_East","NAT_North","LeoDHCollarsNEW")
arcpy.MakeFeatureLayer_management("LeoDHCollarsNEW",'LeoDHCollarslyr')
arcpy.ChangeVersion_management('LeoDHCollars','Transactional','GISADMIN.DataUpdates','')
workspace=r'Database Connections\GISAdmin@SBMPERDBS003.sde'
edit= arcpy.da.Editor(r'Database Connections\GISAdmin@SBMPERDBS003.sde')
edit.startEditing(True,True)
edit.startOperation()
with arcpy.da.InsertCursor("LeoDHCollars", ('SHAPE@', 'Hole_Type')) as icur:
&amp;nbsp;&amp;nbsp;&amp;nbsp; icur.insertRow([(7642471.100, 686465.725), 'New School'])
edit.stopOperation()
edit.stopEditing(True)
arcpy.DisconnectUser(r'Database Connections\SDE@SBMPERDBS003.sde', "ALL")
arcpy.ReconcileVersions_management(workspace,"ALL_VERSIONS","SDE.GIS_Default","GISADMIN.DataUpdates","LOCK_ACQUIRED","NO_ABORT","BY_OBJECT","FAVOR_TARGET_VERSION","POST","KEEP_VERSION")





&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem I am getting is RunTime Error: Workspace already in transaction mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts of why?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 01:23:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693737#M53811</guid>
      <dc:creator>JoeHewitt</dc:creator>
      <dc:date>2013-11-06T01:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDE FeatureClass update with edit session problems</title>
      <link>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693738#M53812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is your data versioned?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 22:05:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693738#M53812</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2013-11-07T22:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDE FeatureClass update with edit session problems</title>
      <link>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693739#M53813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try setting the workspace first thing. Also should it be "env.workspace = r'Database Connections\GISAdmin@SBMPERDBS003.sde'"? And on line 15 it switches from 'Database Connections\GISAdmin@SBMPERDBS003.sde' to 'Database Connections\SDE@SBMPERDBS003.sde'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not super confident any of those are causing the error, but easy enough to try.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 22:26:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693739#M53813</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2013-11-07T22:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDE FeatureClass update with edit session problems</title>
      <link>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693740#M53814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I believe you are getting this error because the dataset is not registered as versioned with the database?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try changing to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
...
edit.startEditing(True,&lt;STRONG&gt;False&lt;/STRONG&gt;)
...
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or register the dataset as versioned before opening the edit session&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:12:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693740#M53814</guid>
      <dc:creator>PaulSchneider</dc:creator>
      <dc:date>2021-12-12T05:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDE FeatureClass update with edit session problems</title>
      <link>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693741#M53815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;And on line 15 it switches from 'Database Connections\GISAdmin@SBMPERDBS003.sde' to 'Database Connections\SDE@SBMPERDBS003.sde'&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The "Database Connections" part of the path that you are seeing is normal behavior.&amp;nbsp; This is Esri's way to abbreviating the default location where SDE connection files are stored on the machine when creating them under Database Connections in ArcCatalog or ArcMap.&amp;nbsp; So, "Database Connections\..." really refers to the user profile directory.&amp;nbsp; For example in Windows 7 or Windows Server 2008 R2, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\Users\userID\AppData\Roaming\ESRI\ArcCatalog\SDE@SBMPERDBS003.sde&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...would be represented by Esri software as... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Database Connections\SDE@SBMPERDBS003.sde&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 13:46:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693741#M53815</guid>
      <dc:creator>WilliamCraft</dc:creator>
      <dc:date>2013-12-12T13:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDE FeatureClass update with edit session problems</title>
      <link>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693742#M53816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My solution was to create a version then create a database connection file and reference the newly created version as the default. I could then drop the change version operation as the edit opens with the specified version from the connection file.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 20:32:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693742#M53816</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2014-01-21T20:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDE FeatureClass update with edit session problems</title>
      <link>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693743#M53817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The "Database Connections" part of the path that you are seeing is normal behavior.&amp;nbsp; This is Esri's way to abbreviating the default location where SDE connection files are stored on the machine when creating them under Database Connections in ArcCatalog or ArcMap.&amp;nbsp; So, "Database Connections\..." really refers to the user profile directory.&amp;nbsp; For example in Windows 7 or Windows Server 2008 R2, &lt;BR /&gt;&lt;BR /&gt;C:\Users\userID\AppData\Roaming\ESRI\ArcCatalog\SDE@SBMPERDBS003.sde&lt;BR /&gt;&lt;BR /&gt;...would be represented by Esri software as... &lt;BR /&gt;&lt;BR /&gt;Database Connections\SDE@SBMPERDBS003.sde&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was refering to the switch in user from GISAdmin to SDE.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 14:50:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693743#M53817</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2014-01-24T14:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDE FeatureClass update with edit session problems</title>
      <link>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693744#M53818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Esri has confirmed this situation and marked it as a bug:&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro" style="background: #f6f6f6; border-width: 0px 0px 0px 2px; border-style: initial initial initial solid; border-color: initial initial initial #cccccc; margin: 10px 0px; padding: 10px 20px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 12.8px;"&gt;BUG-000114598:&lt;/SPAN&gt;&lt;BR clear="none" style="color: #222222; background-color: #ffffff; font-size: 12.8px;" /&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 12.8px;"&gt;-----------------------------&lt;/SPAN&gt;&lt;BR clear="none" style="color: #222222; background-color: #ffffff; font-size: 12.8px;" /&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 12.8px;"&gt;RuntimeError "workspace already in transaction mode" occurs when using da.UpdateCursor on TableView after changing the version.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 19:44:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsde-featureclass-update-with-edit-session/m-p/693744#M53818</guid>
      <dc:creator>pfoppe</dc:creator>
      <dc:date>2018-06-11T19:44:01Z</dc:date>
    </item>
  </channel>
</rss>

