<?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 Unable to change SDE connections with Layer.updateConnectionProperties in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/unable-to-change-sde-connections-with-layer/m-p/502653#M39492</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an ArcSDE layer added to a map in an aprx.&amp;nbsp; I want to change its connection to a different ArcSDE gdb using a *.sde connection file. The dataset name is identical in both enterprise GDBs. After running the snippet below the layer's data source remain the same. I realize I could alter the dictionary instead, but that is not ideal as the password is encrypted in the *.sde file. Any insights on how to get this working? Is it even supported?&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;BR /&gt;map = aprx.listMaps()[0]&lt;BR /&gt;lyr = map.listLayers()[0]&lt;BR /&gt;lyr.updateConnectionProperties(lyr.connectionProperties, r"C:\foo\enterprisegdb.sde")&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Mar 2018 13:40:10 GMT</pubDate>
    <dc:creator>ShaneBuscher</dc:creator>
    <dc:date>2018-03-02T13:40:10Z</dc:date>
    <item>
      <title>Unable to change SDE connections with Layer.updateConnectionProperties</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-change-sde-connections-with-layer/m-p/502653#M39492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an ArcSDE layer added to a map in an aprx.&amp;nbsp; I want to change its connection to a different ArcSDE gdb using a *.sde connection file. The dataset name is identical in both enterprise GDBs. After running the snippet below the layer's data source remain the same. I realize I could alter the dictionary instead, but that is not ideal as the password is encrypted in the *.sde file. Any insights on how to get this working? Is it even supported?&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;BR /&gt;map = aprx.listMaps()[0]&lt;BR /&gt;lyr = map.listLayers()[0]&lt;BR /&gt;lyr.updateConnectionProperties(lyr.connectionProperties, r"C:\foo\enterprisegdb.sde")&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2018 13:40:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-change-sde-connections-with-layer/m-p/502653#M39492</guid>
      <dc:creator>ShaneBuscher</dc:creator>
      <dc:date>2018-03-02T13:40:10Z</dc:date>
    </item>
  </channel>
</rss>

