<?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 Attachment removal with arcpy.da.update in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/attachment-removal-with-arcpy-da-update/m-p/267459#M20581</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Removal of attachments - python. The typical suggestion for scripted attachment removal is to use&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;&amp;nbsp;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;RemoveAttachments_management(), and operate on the base feature class, generate a match table (.csv), etc. to remove attachments from the table&lt;BR /&gt;&lt;BR /&gt;Is there any reason (underlying database issues) that you can't simply remove rows directly from the attachment table using arcpy.da.UpdateCursor? This would seem more direct and faster, and might also bypass the versioned data attachment removal issues discussed 2012-2017 for python and GP tools - am I missing something?&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;Thanks&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;ref:&amp;nbsp;&lt;A href="https://community.esri.com/thread/190362"&gt;Remove Attachments not working on data in SDE, gives warning "Cannot remove attachments for OID = &amp;amp;lt;oid here&amp;amp;gt;"&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;ref:&amp;nbsp;&lt;A href="https://community.esri.com/thread/64487"&gt;Cannot add/remove attachments in python when table/featureclass is versioned&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Sep 2018 18:14:53 GMT</pubDate>
    <dc:creator>DaveSivertsen</dc:creator>
    <dc:date>2018-09-27T18:14:53Z</dc:date>
    <item>
      <title>Attachment removal with arcpy.da.update</title>
      <link>https://community.esri.com/t5/python-questions/attachment-removal-with-arcpy-da-update/m-p/267459#M20581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Removal of attachments - python. The typical suggestion for scripted attachment removal is to use&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;&amp;nbsp;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;RemoveAttachments_management(), and operate on the base feature class, generate a match table (.csv), etc. to remove attachments from the table&lt;BR /&gt;&lt;BR /&gt;Is there any reason (underlying database issues) that you can't simply remove rows directly from the attachment table using arcpy.da.UpdateCursor? This would seem more direct and faster, and might also bypass the versioned data attachment removal issues discussed 2012-2017 for python and GP tools - am I missing something?&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;Thanks&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;ref:&amp;nbsp;&lt;A href="https://community.esri.com/thread/190362"&gt;Remove Attachments not working on data in SDE, gives warning "Cannot remove attachments for OID = &amp;amp;lt;oid here&amp;amp;gt;"&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;ref:&amp;nbsp;&lt;A href="https://community.esri.com/thread/64487"&gt;Cannot add/remove attachments in python when table/featureclass is versioned&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 18:14:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/attachment-removal-with-arcpy-da-update/m-p/267459#M20581</guid>
      <dc:creator>DaveSivertsen</dc:creator>
      <dc:date>2018-09-27T18:14:53Z</dc:date>
    </item>
  </channel>
</rss>

