<?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: listGeodatabases() in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3204#M266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't believe there is any difference between the MS Access databases. If it's created by esri or if it's create my MS Access, it's all the same file.&amp;nbsp; The difference is that a spatial database has a specific set of tables in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can try using a library like &lt;/SPAN&gt;&lt;A href="http://code.google.com/p/pyodbc/"&gt;pyodbc&lt;/A&gt;&lt;SPAN&gt; and look at the tables in the database.&amp;nbsp; If it has the spatial tables, then you know it's a spatial personal geodatabase. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another solution too, would be to use file geodatabases to store spatial data instead of personal geodatabases.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Feb 2011 13:47:29 GMT</pubDate>
    <dc:creator>AndrewChapkowski</dc:creator>
    <dc:date>2011-02-07T13:47:29Z</dc:date>
    <item>
      <title>listGeodatabases()</title>
      <link>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3201#M263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to create a listGeodatabases() method, simular to the gp.listxx-family.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;All works fine, except this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't differ a *.mdb created by Access from those created by ArcCatalog.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;gp.describe(databasePath).DataType&lt;/SPAN&gt;&lt;SPAN&gt; always returns 'Workspace'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone help?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 07:46:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3201#M263</guid>
      <dc:creator>LotharUlferts</dc:creator>
      <dc:date>2011-02-07T07:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: listGeodatabases()</title>
      <link>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3202#M264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Check out the ListWorkspaces() and Describe data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/ListWorkspaces/000v0000001w000000/"&gt;ListWorkspaces()&lt;/A&gt;&lt;SPAN&gt; allows you to specify if you want to find file geodatabase, personal geodatabase, sde, etc...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also use &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Workspace_properties/000v00000037000000/"&gt;Describe()&lt;/A&gt;&lt;SPAN&gt; to get the workspace properties also.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 10:16:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3202#M264</guid>
      <dc:creator>AndrewChapkowski</dc:creator>
      <dc:date>2011-02-07T10:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: listGeodatabases()</title>
      <link>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3203#M265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi andrew, thanks for your speedy reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Check out the ListWorkspaces() and Describe data.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/ListWorkspaces/000v0000001w000000/"&gt;ListWorkspaces()&lt;/A&gt; allows you to specify if you want to find file geodatabase, personal geodatabase, sde, etc...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Thats the goal: To differ ACCES-MBS from ArcGIS-MDBs. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.ListWorkspaces('*','Access') returns both typs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You can also use &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Workspace_properties/000v00000037000000/"&gt;Describe()&lt;/A&gt; to get the workspace properties also.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I couldn't find a property on which an ACCES-MDB gives another value then the ArcGIS-MDB.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tested this on the data in the attached &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;example.zip&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 12:41:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3203#M265</guid>
      <dc:creator>LotharUlferts</dc:creator>
      <dc:date>2011-02-07T12:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: listGeodatabases()</title>
      <link>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3204#M266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't believe there is any difference between the MS Access databases. If it's created by esri or if it's create my MS Access, it's all the same file.&amp;nbsp; The difference is that a spatial database has a specific set of tables in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can try using a library like &lt;/SPAN&gt;&lt;A href="http://code.google.com/p/pyodbc/"&gt;pyodbc&lt;/A&gt;&lt;SPAN&gt; and look at the tables in the database.&amp;nbsp; If it has the spatial tables, then you know it's a spatial personal geodatabase. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another solution too, would be to use file geodatabases to store spatial data instead of personal geodatabases.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 13:47:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3204#M266</guid>
      <dc:creator>AndrewChapkowski</dc:creator>
      <dc:date>2011-02-07T13:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: listGeodatabases()</title>
      <link>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3205#M267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I don't believe there is any difference between the MS Access databases. If it's created by esri or if it's create my MS Access, it's all the same file.&amp;nbsp; The difference is that a spatial database has a specific set of tables in it.[....] Another solution too, would be to use file geodatabases to store spatial data instead of personal geodatabases.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunatly my script is operating in folder with unknown content. And in each GDB of this folder one FeatureClass has to be created to summerize something. DBs created with Access causes an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You can try using a library like &lt;A href="http://code.google.com/p/pyodbc/"&gt;pyodbc&lt;/A&gt; and look at the tables in the database.&amp;nbsp; If it has the spatial tables, then you know it's a spatial personal geodatabase.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;That's a good solution. I try this&amp;nbsp; hint and perhaps I can announce a solution.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 16:17:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3205#M267</guid>
      <dc:creator>LotharUlferts</dc:creator>
      <dc:date>2011-02-07T16:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: listGeodatabases()</title>
      <link>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3206#M268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Why not just try to create that feature class, and if it doesn't work, just assume it's an access db. Something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
mdb_list = gp.ListWorkspaces('*', 'Access')
for each mdb in mdb_list:
&amp;nbsp;&amp;nbsp;&amp;nbsp; try:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CreateFeatureClass(your_arguments)
&amp;nbsp;&amp;nbsp;&amp;nbsp; except WhateverExceptionYouGetWithWrongTypeOfMDBs:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass # Just ignore (or maybe you should log something)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:08:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3206#M268</guid>
      <dc:creator>NiklasNorrthon</dc:creator>
      <dc:date>2021-12-10T20:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: listGeodatabases()</title>
      <link>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3207#M269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Why not just try to create that feature class, and if it doesn't work, just assume it's an access db. Something like:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
mdb_list = gp.ListWorkspaces('*', 'Access')
for each mdb in mdb_list:
&amp;nbsp;&amp;nbsp;&amp;nbsp; try:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CreateFeatureClass(your_arguments)
&amp;nbsp;&amp;nbsp;&amp;nbsp; except WhateverExceptionYouGetWithWrongTypeOfMDBs:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass # Just ignore (or maybe you should log something)
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This seems error-prone and potentially very slow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI should provide a built-in method to determine whether an MDB file is a PGDB or a regular Access database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See also: &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/8903-Finding-All-Geodatabases-Inside-Main-Folder-and-Subfolders?p=37986" rel="nofollow noopener noreferrer" target="_blank"&gt;Finding All Geodatabases Inside Main Folder and Subfolders&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:08:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3207#M269</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2021-12-10T20:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: listGeodatabases()</title>
      <link>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3208#M270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Add this simple line of code to check for Access:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
...
if gdb.endswith(".mdb"):
...
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:08:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3208#M270</guid>
      <dc:creator>RDHarles</dc:creator>
      <dc:date>2021-12-10T20:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: listGeodatabases()</title>
      <link>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3209#M271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Add this simple line of code to check for Access:&lt;BR /&gt; &lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
...
if gdb.endswith(".mdb"):
...
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That will still return true for both personal geodatabases which are Access-based and use the .mdb file extension, and plain Access MDB databases which are not geodatabases.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:08:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3209#M271</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2021-12-10T20:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: listGeodatabases()</title>
      <link>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3210#M272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hy,&lt;/P&gt;&lt;P&gt;after a long time I fond a soloution in the workspace 'release'-property:&lt;/P&gt;&lt;P&gt;arcpy.Describe(PGDB-WS)&amp;nbsp; returns something like &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: teal;"&gt;u'3,0,0'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;while arcpy.Describe(pure_MSACCESS-WS) returns somethinge like this &lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: teal;"&gt;u'400558244,2616584,323869160'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's ok for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: teal;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2015 11:31:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3210#M272</guid>
      <dc:creator>LotharUlferts</dc:creator>
      <dc:date>2015-07-31T11:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: listGeodatabases()</title>
      <link>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3211#M273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;4½ years is indeed a long time... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2015 11:50:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listgeodatabases/m-p/3211#M273</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-07-31T11:50:11Z</dc:date>
    </item>
  </channel>
</rss>

