<?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: Can't release layer lock on geodatabase in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826188#M3045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karen.&lt;/P&gt;&lt;P&gt;I am using ArcGIS Pro 2.4.3 and code I copied earlier works for me with all versions from 2.0.&lt;/P&gt;&lt;P&gt;Maybe your file geodatabase has some special components such as geometry network, topology, relationship classes or etc.?&lt;/P&gt;&lt;P&gt;My file geodatabase contains only feature datasets, feature classes and tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Dec 2019 07:28:00 GMT</pubDate>
    <dc:creator>GKmieliauskas</dc:creator>
    <dc:date>2019-12-30T07:28:00Z</dc:date>
    <item>
      <title>Can't release layer lock on geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826179#M3036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm creating a new layer in a map using&amp;nbsp;LayerFactory.Instance.CreateFeatureLayer with an existing layer file previously created with ArcGIS 10.5.1 (i.e., .lyr, .lyrx).&amp;nbsp; Once this new layer is created, since I know it's data link is broken I change it's data source to a different data source that contains the appropriate data.&amp;nbsp; This all works fine.&amp;nbsp; The problem is that when I change the layer's data source, it puts a lock on the entire geodatabase containing the data and now I can't write anything else to the geodatabase.&amp;nbsp; Even if I close the map containing the layer, the lock remains until I close Pro. Does anyone have any ideas how to release the lock?&amp;nbsp; Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Layer newlayer = LayerFactory.Instance.CreateFeatureLayer(symbologyUri, MyMap, LayerPosition.AddToTop);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CIMStandardDataConnection newDataConnection = new CIMStandardDataConnection()&lt;BR /&gt; {&lt;BR /&gt; WorkspaceConnectionString = workspaceConnectionStringForNewData,&lt;BR /&gt; WorkspaceFactory = WorkspaceFactory.FileGDB,&lt;BR /&gt; Dataset = datasetName,&lt;BR /&gt; DatasetType = esriDatasetType.esriDTFeatureClass&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;newlayer.SetDataConnection(newDataConnection);&amp;nbsp;&lt;EM&gt; //This is where the lock occurs&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Dec 2019 22:32:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826179#M3036</guid>
      <dc:creator>KarenMeinstein</dc:creator>
      <dc:date>2019-12-17T22:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can't release layer lock on geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826180#M3037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karen,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Few lines&lt;/SPAN&gt; &lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt; were&lt;/SPAN&gt; In ArcGIS Pro sample with SetDataConnection (after SetDataConnection call):&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Bug #2, we manually invalidate the cache&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; newlayer.ClearDisplayCache();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We use them in workspace loading tool which loads all feature classes with predefined lyr files and have no problems with database locking.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it will help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2019 07:12:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826180#M3037</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2019-12-18T07:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can't release layer lock on geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826181#M3038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much for the tip!&amp;nbsp; That still didn't fix the issue, but hopefully it's a step in the right direction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2019 17:08:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826181#M3038</guid>
      <dc:creator>KarenMeinstein</dc:creator>
      <dc:date>2019-12-19T17:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can't release layer lock on geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826182#M3039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karen,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I add some parts of my code. One&amp;nbsp; with new connection and next one with layer adding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static Task ChangeFeatureLayerDataConnectionAsync(FeatureLayer featureLayer, string catalogPath)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return QueuedTask.Run(() =&amp;gt; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CIMDataConnection currentDataConnection = featureLayer.GetDataConnection();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string connection = System.IO.Path.GetDirectoryName(catalogPath);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string suffix = System.IO.Path.GetExtension(connection).ToLower();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WorkspaceFactory wf = WorkspaceFactory.FileGDB;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (suffix == ".sde")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wf = WorkspaceFactory.SDE;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string dataset = System.IO.Path.GetFileName(catalogPath);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var dbGdbConnection = new FileGeodatabaseConnectionPath(new Uri(connection, UriKind.Absolute));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // provide a replace data connection method&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CIMStandardDataConnection updatedDataConnection = new CIMStandardDataConnection()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WorkspaceConnectionString = new Geodatabase(dbGdbConnection).GetConnectionString(),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WorkspaceFactory = wf,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dataset = dataset,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DatasetType = esriDatasetType.esriDTFeatureClass&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureLayer.SetDataConnection(updatedDataConnection);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Bug #2, we manually invalidate the cache&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureLayer.ClearDisplayCache();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;FetureLayer featLayer = (FeatureLayer)LayerFactory.Instance.CreateLayer(new Uri(sLyrPath), map);&lt;BR /&gt;ChangeFeatureLayerDataConnectionAsync(featLayer, sDatabase + "\\" + sTableName);&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;If it will not change your geodatabase locking status, so the problem is in writing to database.&lt;/DIV&gt;&lt;DIV&gt;Good luck.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2019 06:45:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826182#M3039</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2019-12-20T06:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can't release layer lock on geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826183#M3040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the additional info, but I realized that the problem is some change that ESRI has made to how layers in the maps interact with their data sources.&amp;nbsp; I&amp;nbsp;have some other similar code that worked previously (in July) that doesn't work now and I haven't changed anything in the code, but there have been Arc Pro updates since then.&amp;nbsp; For any regular Arc Pro code everything works fine, but I have some Gdal code behind the scenes that writes to a geodatabase that is the data source for a layer that is already in the map, and now that code can't get access to the geodatabase because of a schema lock.&amp;nbsp; This didn't happen before.&amp;nbsp; So I think I need to submit a bug report.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2019 16:44:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826183#M3040</guid>
      <dc:creator>KarenMeinstein</dc:creator>
      <dc:date>2019-12-20T16:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can't release layer lock on geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826184#M3041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a similar issue.&amp;nbsp; Rather than wait for ESRI to fix/pay attention, I completely externalized my process in Python using arcpy.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2019 17:12:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826184#M3041</guid>
      <dc:creator>MikeRatcliffe</dc:creator>
      <dc:date>2019-12-23T17:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can't release layer lock on geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826185#M3042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I submitted a bug report, so we'll see what happens - hope springs eternal&amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;.&amp;nbsp; I went back to earlier versions of Pro, and I found that the problem started in v2.3.2.&amp;nbsp; In earlier versions&amp;nbsp;our code worked fine.&amp;nbsp; In the release notes for v2.3.2, one of the bugs that is shown as fixed is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;BUG-000119207&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;Adding geodatabase data from a folder connection to a map disables schema locking.&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if "fixing" that bug caused other schema lock problems.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2019 18:42:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826185#M3042</guid>
      <dc:creator>KarenMeinstein</dc:creator>
      <dc:date>2019-12-23T18:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can't release layer lock on geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826186#M3043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.&amp;nbsp; That&amp;nbsp;bug is the same trail I went down.&amp;nbsp; I had a working tool, and was broken after 2.3.2.--schema lock will not release until Pro Application&amp;nbsp;is closed.&amp;nbsp; Without any API resources to reevaluate, refresh, or force schema locks; I had to work outside the box.&amp;nbsp; Sad to hear I'm not the only one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2019 18:56:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826186#M3043</guid>
      <dc:creator>MikeRatcliffe</dc:creator>
      <dc:date>2019-12-23T18:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can't release layer lock on geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826187#M3044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe if enough people report the issue they'll do something about it. This is going to be a big headache to work around.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2019 19:26:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826187#M3044</guid>
      <dc:creator>KarenMeinstein</dc:creator>
      <dc:date>2019-12-23T19:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can't release layer lock on geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826188#M3045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karen.&lt;/P&gt;&lt;P&gt;I am using ArcGIS Pro 2.4.3 and code I copied earlier works for me with all versions from 2.0.&lt;/P&gt;&lt;P&gt;Maybe your file geodatabase has some special components such as geometry network, topology, relationship classes or etc.?&lt;/P&gt;&lt;P&gt;My file geodatabase contains only feature datasets, feature classes and tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Dec 2019 07:28:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826188#M3045</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2019-12-30T07:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can't release layer lock on geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826189#M3046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a Eureka! moment today about this issue while putting together a simple example of the problem for ESRI support.&amp;nbsp; The failure occurs when the gdal code that is accessing the geodatabase&amp;nbsp;is within the QueryTask.Run call where the data in the same geodatabase is accessed (i.g., LayerFactory.Instance.CreateFeatureLayer()).&amp;nbsp; If I move the gdal code outside of the QueryTask.Run, it can access the geodatabase&amp;nbsp;with no problem.&amp;nbsp;&amp;nbsp;This wasn't obvious in my original code because the gdal code was in a method called from within the QueryTask.Run.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this code doesn't work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public async Task RunTest()&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;await QueuedTask.Run(async () =&amp;gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map testMap = MapFactory.Instance.CreateMap("Test");&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;testMap.SetSpatialReference(SpatialReferences.WGS84);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Uri layerUri = new Uri(@"C:\Users\kbmeinstein\Desktop\GDBTest\GDBtest.gdb\polygons");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ArcGIS.Desktop.Mapping.Layer newlayer = LayerFactory.Instance.CreateFeatureLayer(layerUri, testMap, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LayerPosition.AddToBottom);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;await ProApp.Panes.CreateMapPaneAsync(testMap);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Driver fileGDBDriver = OSGeo.OGR.Ogr.GetDriverByName("FileGDB");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Failure happens here:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DataSource dataSource = fileGDBDriver.Open(@"C:\Users\kbmeinstein\Desktop\GDBTest\GDBtest.gdb", 1);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this does:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public async Task RunTest()&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;await QueuedTask.Run(async () =&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map testMap = MapFactory.Instance.CreateMap("Test");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;testMap.SetSpatialReference(SpatialReferences.WGS84);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Uri layerUri = new Uri(@"C:\Users\kbmeinstein\Desktop\GDBTest\GDBtest.gdb\polygons");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ArcGIS.Desktop.Mapping.Layer newlayer = LayerFactory.Instance.CreateFeatureLayer(layerUri, testMap, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LayerPosition.AddToBottom);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;await ProApp.Panes.CreateMapPaneAsync(testMap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Driver fileGDBDriver = OSGeo.OGR.Ogr.GetDriverByName("FileGDB");&lt;/P&gt;&lt;P&gt;&amp;nbsp; //This works fine now:&lt;BR /&gt;&amp;nbsp; DataSource dataSource = fileGDBDriver.Open(@"C:\Users\kbmeinstein\Desktop\GDBTest\GDBtest.gdb", 1);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An important thing to note is that in Pro v2.3.1, code like the example above that doesn't work now (i.e., with the gdal within the QueryTask.Run) worked fine, so something definitely changed in v2.3.2.&amp;nbsp; Hopefully they'll fix this, but at least now I have a workaround and hopefully this is helpful to someone else.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Dec 2019 23:11:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-release-layer-lock-on-geodatabase/m-p/826189#M3046</guid>
      <dc:creator>KarenMeinstein</dc:creator>
      <dc:date>2019-12-30T23:11:16Z</dc:date>
    </item>
  </channel>
</rss>

