<?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: FeatureLayer from local FeatureTable: How to avoid exception &amp;quot;data_source is already owned&amp;quot;? in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/featurelayer-from-local-featuretable-how-to-avoid/m-p/460088#M5673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is something that works. I haven't worked out which steps are essential, but it does seem to work.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&lt;SPAN style="color: #0000ff; font-size: small;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; (MapViewModel.Map != &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small;"&gt;null&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;MapViewModel.Map.OperationalLayers.Clear();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #008000; font-size: small; font-family: courier new,courier,monospace;"&gt;// just sets Geodatabase references to null&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;_geodatabaseFactoryService.ReleaseGeodatabases();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&lt;SPAN style="color: #2b91af; font-size: small;"&gt;GC&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.Collect();&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: small;"&gt;GC&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.WaitForPendingFinalizers();&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jan 2017 15:51:36 GMT</pubDate>
    <dc:creator>deleted-user-Ohz6rwd1kavx</dc:creator>
    <dc:date>2017-01-23T15:51:36Z</dc:date>
    <item>
      <title>FeatureLayer from local FeatureTable: How to avoid exception "data_source is already owned"?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/featurelayer-from-local-featuretable-how-to-avoid/m-p/460087#M5672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting an exception&amp;nbsp;"data_source is already owned" when create a FeatureLayer from a local FeatureTable. In my situation I had already created&amp;nbsp;another FeatureLayer (in another Map) based on the same FeatureTable. I believe this relates to&amp;nbsp;.geodatabase locking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have just begun investigating, but I am curious if anyone else is setting this, and more importantly if there are known steps to&amp;nbsp;avoid this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Cory&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 14:48:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/featurelayer-from-local-featuretable-how-to-avoid/m-p/460087#M5672</guid>
      <dc:creator>deleted-user-Ohz6rwd1kavx</dc:creator>
      <dc:date>2017-01-23T14:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer from local FeatureTable: How to avoid exception "data_source is already owned"?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/featurelayer-from-local-featuretable-how-to-avoid/m-p/460088#M5673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is something that works. I haven't worked out which steps are essential, but it does seem to work.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&lt;SPAN style="color: #0000ff; font-size: small;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; (MapViewModel.Map != &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small;"&gt;null&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;MapViewModel.Map.OperationalLayers.Clear();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #008000; font-size: small; font-family: courier new,courier,monospace;"&gt;// just sets Geodatabase references to null&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;_geodatabaseFactoryService.ReleaseGeodatabases();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&lt;SPAN style="color: #2b91af; font-size: small;"&gt;GC&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.Collect();&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: small;"&gt;GC&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.WaitForPendingFinalizers();&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 15:51:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/featurelayer-from-local-featuretable-how-to-avoid/m-p/460088#M5673</guid>
      <dc:creator>deleted-user-Ohz6rwd1kavx</dc:creator>
      <dc:date>2017-01-23T15:51:36Z</dc:date>
    </item>
  </channel>
</rss>

