<?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: Cannot edit versioned SDE data with Python update or insert cursor functions in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313447#M10908</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am attempting to use the insert cursor on an SDE connection and v10 sp3 doesn't seem to help, no row is added.&amp;nbsp; Perhaps I am doing something else incorrectly?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jan 2012 19:07:01 GMT</pubDate>
    <dc:creator>SeanRedar</dc:creator>
    <dc:date>2012-01-12T19:07:01Z</dc:date>
    <item>
      <title>Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313442#M10903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ESRI article ID 28084 (&lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=28084"&gt;http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=28084&lt;/A&gt;&lt;SPAN&gt;) discusses a limitation with the Python UpdateCursor or InsertCursor function when using versioned SDE data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now we have an ArcSDE versioned featureclass that portrays property parcels and among the many fields is one called PARCEL_NUMBER.&amp;nbsp; I�??ve developed a Python script within a 9.3.1 SP2 environment that first makes SQL queries against another internal Informix Property database system for all the respective Property Parcels and returns the Parcel Numbers into a Python list variable.&amp;nbsp; The script then takes this list variable, loops through and populates the PARCEL_NUMBER field for the respective property parcel where there is a missing Parcel Number value using the UpdateCursor function.&amp;nbsp;&amp;nbsp; It works well when the featureclass is not versioned.&amp;nbsp; When the featureclass is versioned, the script runs error free but does not populate the respective fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A local ESRI support person advised that this would be rectified in ArcGIS 10 but when I tested it with a simple ArcPy script within an ArcGIS 10 Personal ArcSDE Geodatabase (based on a SQL Server Express 2008), it still exhibits the same problem.&amp;nbsp; Given the nature of versioning and its intrinsic use of delta tables, is it really possible to use an UpdateCursor function directly on a versioned featureclass? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Article ID 28084 discusses a possible workaround using disconnected editing via a check-out, run script on featureclass then check-in featureclass approach.&amp;nbsp; I believe this whole workflow could be entirely scriptable but has anyone successfully tried this? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have an alternative approach but it would involve two separate steps:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Create a stand-alone table with referenced PARCEL_NUMBER values using a Python script.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Start ArcMap and do a spatial join with the table on the property parcel featureclass and use a field calculator script to populate the missing PARCEL_NUMBER fields during an edit session.&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;BR /&gt;&lt;SPAN&gt;To this end, I�??m seeking alternative methods to get around this underlying limitation (or Bug??).&amp;nbsp;&amp;nbsp; I�??d appreciate any good ideas in how I could craft a script that could get all the steps in one all inclusive automotive approach without separating the processes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tony&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bundaberg Regional Council&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Oct 2010 04:06:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313442#M10903</guid>
      <dc:creator>AnthonyGangemi</dc:creator>
      <dc:date>2010-10-12T04:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313443#M10904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You might try passing into the Field Calculator tool.&amp;nbsp; It won't be as fast as the UpdateCursor but it gets the job done.&amp;nbsp; We frequently use this approach.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.CalculateField_management("featureclass", "field", &amp;lt;Parcel Variable Here&amp;gt;, "VB") &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 21:26:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313443#M10904</guid>
      <dc:creator>MikeLong</dc:creator>
      <dc:date>2010-11-30T21:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313444#M10905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is this still true for 10.0? We are in the same situation and are looking to use cursors on SDE versioned data.&amp;nbsp; Any feedback would be highly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 17:05:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313444#M10905</guid>
      <dc:creator>ArcGISUser</dc:creator>
      <dc:date>2011-04-21T17:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313445#M10906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've run into the same issue with cursors on a table. My script works fine on a file geodatabase, but does not update or insert records in a versioned SDE. Does anyone know if there is a workaround for this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 14:18:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313445#M10906</guid>
      <dc:creator>RuthEmerick</dc:creator>
      <dc:date>2012-01-09T14:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313446#M10907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This was a bug that we fixed at 10.0 SP3. If you are attempting to use insert or update cursors against versioned data and they are not working, please try installing SP3.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 15:24:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313446#M10907</guid>
      <dc:creator>RussellBrennan</dc:creator>
      <dc:date>2012-01-10T15:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313447#M10908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am attempting to use the insert cursor on an SDE connection and v10 sp3 doesn't seem to help, no row is added.&amp;nbsp; Perhaps I am doing something else incorrectly?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2012 19:07:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313447#M10908</guid>
      <dc:creator>SeanRedar</dc:creator>
      <dc:date>2012-01-12T19:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313448#M10909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am attempting to use the insert cursor on an SDE connection and v10 sp3 doesn't seem to help, no row is added.&amp;nbsp; Perhaps I am doing something else incorrectly?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you send a simple example of what you are attempting to do?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a quick script that I wrote that is working on my 10.1 beta build and should also work on 10.0 SP3:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpygdb = 'Database Connections/gdb.sde' #change this to your GDB
table = arcpy.CreateTable_management(gdb, 'testCursor')
arcpy.AddField_management(table, 'testField', "TEXT")
cur = arcpy.InsertCursor(table)
row = cur.newRow()
row.testField = 'insertedTextFromCursor'
cur.insertRow(row)
del cur
del row&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:56:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313448#M10909</guid>
      <dc:creator>RussellBrennan</dc:creator>
      <dc:date>2021-12-11T14:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313449#M10910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am creating a tool that will allow a user to upload a csv file into our Oracle/SDE database.&amp;nbsp; Not sure what changed from yesterday to today but now this script is working, it successfully inserted the record.&amp;nbsp; Here is the code,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, csv&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#### parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inCSV = "C:\\Temp\\test.csv"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#### connect to sde database&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;env.workspace = "\\\\egis\\GeoTools\\System\\cw_em_load.sde"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;copfc = "EM.COPIncident_P"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#### parse and convert csv to list, create point the prepare attributes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;opencsv = open(inCSV, 'rt')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;csvlist = csv.reader(opencsv)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for row in csvlist:&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pnt = arcpy.Point()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pnt.Y = float(row[7])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pnt.X = float(row[8])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inctype = row[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#### create insert cursor and insert feature&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cur = arcpy.InsertCursor(copfc,"\\\\egis\\GeoTools\\System\\WGS 1984.prj")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sdrow = cur.newRow()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sdrow.SHAPE = pnt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sdrow.INCIDENTTYPE = inctype&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cur.insertRow(sdrow)&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#### cleanup&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;opencsv.close()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;del sdrow, cur, pnt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 15:48:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313449#M10910</guid>
      <dc:creator>SeanRedar</dc:creator>
      <dc:date>2012-01-13T15:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313450#M10911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This was a bug that we fixed at 10.0 SP3. If you are attempting to use insert or update cursors against versioned data and they are not working, please try installing SP3.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've actually been using SP3 for a while. I've decided to just to my edits in a file geodatabase and then just replace all the rows in the SDE table on a weekly basis with Delete and Append.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 15:03:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313450#M10911</guid>
      <dc:creator>RuthEmerick</dc:creator>
      <dc:date>2012-01-18T15:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313451#M10912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I've actually been using SP3 for a while. I've decided to just to my edits in a file geodatabase and then just replace all the rows in the SDE table on a weekly basis with Delete and Append.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Were you able to run the sample code that I posted above?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 15:24:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313451#M10912</guid>
      <dc:creator>RussellBrennan</dc:creator>
      <dc:date>2012-01-19T15:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313452#M10913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am having this issue too. I am trying to remove lines from a versioned table and then add new ones. I do not want to delete the table because it is part of a replica.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Russell, I tried your script but I am not sure it would test a versioned table, there is no where that the new table is registered as versioned. I tried a different script running on a table I created and then registered as versioned. In fact I tried this on a non-versioned table and it worked. I then deleted the table and created a new one and registered it as versioned, it did not work. Here is the script I used:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;table = 'Database Connections/SDE Dev.sde/CHWKSDE_Dev.DBO.TEMP_FOR_SCRIPT_TEST'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cur = arcpy.InsertCursor(table)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;row = cur.newRow()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;row.Field1 = 'Test1'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cur.insertRow(row)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;del cur&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;del row&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used a connection that is set to the default version. When I say it did not work, what I mean is that the new row does not show up in the table in ArcMap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Doing some digging, I do see the row showing up in the table's add table but I can't figure out why it does not appear in ArcMap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After I found this post, we upgraded ArcMap, server and SDE to SP4.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have considered changing the table to non-versioned but I have to develop some similar scripts to run against versioned feature classes so I will run into this again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is driving us a little crazy. I would appreciate any help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Phil Smith&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;City of Chilliwack&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2012 22:04:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313452#M10913</guid>
      <dc:creator>PhilipSmith1</dc:creator>
      <dc:date>2012-03-23T22:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313453#M10914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Phil, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It appears that the issue with using insert cursors against versioned data was only partially fixed. Using insert cursors should work against the Default version, however they still appear to be broken against other edit versions in 10.0 SP4. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A new bug has been submitted for this: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NIM079496 - When editing non-Default versions using insert cursorts the inserts are not being applied in 10.0 SP4.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This works in 10.1 Pre-release and we plan to ensure this gets fixed in an upcoming service pack.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have access to a 10.1 Desktop machine you could use this to perform your updates as the fix is on the client side not the geodatabase/server side.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Russell&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 21:21:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313453#M10914</guid>
      <dc:creator>RussellBrennan</dc:creator>
      <dc:date>2012-03-30T21:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313454#M10915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Will there be a 10.0 SP5 or will we need to wait for 10.1 ?&amp;nbsp; thanks- Jake Brown&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 23:13:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313454#M10915</guid>
      <dc:creator>JakeBrown1</dc:creator>
      <dc:date>2012-05-03T23:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313455#M10916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've noticed that the UpdateCursor will insert rows into the delta tables, but when I compress, the edits disappear.&amp;nbsp; I'm working on a test database, so I've been fooling with the states and state IDs...to no avail.&amp;nbsp; Has anybody come up with a solution to this?&amp;nbsp; I've altered the script to run on a FGDB, but it's not updating the values.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 18:20:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313455#M10916</guid>
      <dc:creator>dmacq</dc:creator>
      <dc:date>2012-07-09T18:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313456#M10917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@jjbrownBPA&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems that bug NIM-079496 is not included in Service Pack 5 which came out two days ago&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Issues addressed here&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://gisupdates.esri.com/10sp5/ArcGIS/ArcGIS10sp5-issues.htm"&gt;http://gisupdates.esri.com/10sp5/ArcGIS/ArcGIS10sp5-issues.htm&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Download SP5 here&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/content/patches-and-service-packs?fa=viewPatch&amp;amp;PID=17&amp;amp;MetaID=1876"&gt;http://resources.arcgis.com/content/patches-and-service-packs?fa=viewPatch&amp;amp;PID=17&amp;amp;MetaID=1876&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a colleague who's having a similar issue on ArcGIS 10 SP4. When he runs the script, the Add and Delete tables gets filled but changes don't show up in ArcMap. Compressing the GDB (like what @drewgis does) makes changes disappear from the Add and Delete tables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm setting up a separate test on my machine to figure out the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas would be welcomed. Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2012 16:38:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313456#M10917</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-07-12T16:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313457#M10918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;seems that SP5 didn't solve anything about this issue...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm still facing the exact same issue on an upgraded-to-SP5 ArcSDE o/Oracle&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cedric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 10:51:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313457#M10918</guid>
      <dc:creator>cedricvenzo</dc:creator>
      <dc:date>2012-12-05T10:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313458#M10919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have found the same, or similar problem in 10.1. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My update cursor in ArcMap makes the changes in the displayed feature class table,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but as soon as one saves, the changes vaporize.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have found a work-around. I make a dummy CalculateField calculation on one field, where I calculate the field to itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That geoprocessing tool calc on one field seems to 'commit' all the changes the cursor made to all the fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Like all work-arounds, I hope it continues to help....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 12:21:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313458#M10919</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2012-12-05T12:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313459#M10920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've been investigating the reported issues here and through reports to our Support team and so far have found only one reason for this to be failing as described in 10.1 (and 10SP4-5).&amp;nbsp; Something has a lock on the data prior to attempting the update or insert.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In some cases this is because something before the call to update or insert has put a lock on the feature class.&amp;nbsp; For example, an UpdateCursor is created on a feature class and the UpdateCursor object is not being deleted prior to trying to insert rows with an InsertCursor on the same versioned feature class.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please check to make sure that there are no locks on the data that could be preventing the update or insert from occurring.&amp;nbsp; If you are not familiar with Geodatabase locks, please see &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//019000000004000000"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When moving to 10.1, please consider using the new Data Access arcpy module.&amp;nbsp; You will realize better performance and control when cursors are needed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In case you haven't seen it yet, the following is from the 10.1 'What's New - Geoprocessing' section of the help:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The data access module, arcpy.da, is a Python module for working with data. It allows control of the edit session, edit operation, improved cursor support (including faster performance), functions for converting tables and feature classes to and from NumPy arrays, and support for versioning, replicas, domains, and subtypes workflows.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018w00000008000000"&gt;Learn more about the data access module&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If, after you make sure you aren't inadvertently locking your data, you still have cases where you can't figure out why your updates and inserts are not showing up, please submit a support incident with data and complete instructions on how to reproduce the problem so we can investigate the behavior you are seeing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ken Hartling&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Senior GP Product Engineer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 21:52:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313459#M10920</guid>
      <dc:creator>KenHartling</dc:creator>
      <dc:date>2013-01-23T21:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313460#M10921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still having issues 3 years later at 10.4.1. I'm trying to use an update cursor on an sde versioned database. Here's a test script:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;streetCLInput &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'Database Connections\brandon_edits.sde\oki.sde.StreetCL'&lt;/SPAN&gt;
workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'Database Connections\brandon_edits.sde'&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;streetCLInput&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'streets'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ChangeVersion_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"streets"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"TRANSACTIONAL"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"brandon_edits.brandon"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
edit &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Editor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;workspace&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startEditing&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startOperation&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'streets'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'objectid'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'suffix'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'objectid = 11040'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;''&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;stopOperation&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;stopEditing&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Script Complete'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The script crashes at line 10, but its because of line 5. Comment out line 5 and the script works, except the edits are made to the default version.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's another script basically copied and pasted from here :&amp;nbsp;&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/data-access/editor.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://pro.arcgis.com/en/pro-app/arcpy/data-access/editor.htm&lt;/A&gt;&amp;nbsp;with edits to change the version.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'Database Connections\brandon_edits.sde\oki.sde.StreetCL'&lt;/SPAN&gt;
workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'Database Connections\brandon_edits.sde'&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'streets'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#arcpy.ChangeVersion_management("streets", "TRANSACTIONAL", "brandon_edits.brandon")&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Start an edit session. Must provide the workspace.&lt;/SPAN&gt;
edit &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Editor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;workspace&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Edit session is started without an undo/redo stack for versioned data&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#&amp;nbsp; (for second argument, use False for unversioned data)&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startEditing&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Start an edit operation&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startOperation&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Insert a row into the table.&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;InsertCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"streets"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'name'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; icur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; icur&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;insertRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'New Test'&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;# Stop the edit operation.&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;stopOperation&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Stop the edit session and save the changes&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;stopEditing&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The script "works" with line 5 commented out except again the edits are &lt;EM&gt;made to the default version&lt;/EM&gt;. With line 5 uncommented, the script fails.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how do you edit an sde versioned dataset with arcpy and not edit the default version? Any help would be much appreciated. (I'm starting to think the versioning is more hassle than its worth.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:57:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313460#M10921</guid>
      <dc:creator>BrandonFlessner</dc:creator>
      <dc:date>2021-12-11T14:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot edit versioned SDE data with Python update or insert cursor functions</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313461#M10922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the problem, in Catalog, the connection to the versioned data was using the default version as the transactional version to automatically connect to. To change this, you need to change the geodatabase connection properties to point to the version you wish to edit by default.&amp;nbsp;It's a little confusing and odd that the default behavior is to edit the parent version of the version you are connected to but whatever. Its working now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still think the above script should execute without having to edit any geodatabase connection properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also see this:&amp;nbsp;&lt;SPAN style="font-size: 12.0pt;"&gt;BUG-000101529 : The 'Make Feature Layer' geoprocessing tool fails when 64-bit Background Geoprocessing is utilized with ArcGIS 10.4.1. when using a sde database connection.&amp;nbsp;&lt;/SPAN&gt;Potentially fixed at 10.5.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 14:10:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/cannot-edit-versioned-sde-data-with-python-update/m-p/313461#M10922</guid>
      <dc:creator>BrandonFlessner</dc:creator>
      <dc:date>2016-12-19T14:10:29Z</dc:date>
    </item>
  </channel>
</rss>

