<?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: Listing datasets doesn't bring back the correct result in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/listing-datasets-doesn-t-bring-back-the-correct/m-p/426519#M1468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: earnshaw&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found out the problem just use :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ClearWorkspaceCache_management()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and this clears any locks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Oct 2013 11:56:23 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2013-10-01T11:56:23Z</dc:date>
    <item>
      <title>Listing datasets doesn't bring back the correct result</title>
      <link>https://community.esri.com/t5/transportation-questions/listing-datasets-doesn-t-bring-back-the-correct/m-p/426518#M1467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I do a ListDatasets() in python, then I don't get the correct result in the list except for datasets belong to other schema owners, so why can I still see the datasets in ArcCatalog.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code is staightforward:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;workspace = r'Database Connections\\enidb.sde'
arcpy.env.workspace = workspace
dslist = arcpy.ListDatasets()&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The dslist is empty bar the CULTURAL.ESRI_DATASETS - I should be able to see all the ENIDB ones as I am logged in as that schema owner:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]27872[/ATTACH][ATTACH=CONFIG]27873[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:12:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/listing-datasets-doesn-t-bring-back-the-correct/m-p/426518#M1467</guid>
      <dc:creator>SimonEarnshaw</dc:creator>
      <dc:date>2021-12-11T19:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Listing datasets doesn't bring back the correct result</title>
      <link>https://community.esri.com/t5/transportation-questions/listing-datasets-doesn-t-bring-back-the-correct/m-p/426519#M1468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: earnshaw&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found out the problem just use :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ClearWorkspaceCache_management()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and this clears any locks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 11:56:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/listing-datasets-doesn-t-bring-back-the-correct/m-p/426519#M1468</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-10-01T11:56:23Z</dc:date>
    </item>
  </channel>
</rss>

