<?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: PYODBC connection to Access not working within ArcGIS in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/pyodbc-connection-to-access-not-working-within/m-p/56223#M4451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you connecting to 32 or 64 bit Access?&amp;nbsp; You might try:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;connStr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
    r&lt;SPAN class="string token"&gt;"DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};"&lt;/SPAN&gt;
    r&lt;SPAN class="string token"&gt;"P:\Conservation Programs\Natural Heritage Program\Data Management\ACCESS databases\POND_entry\POND_be.accdb;"&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
conn &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; pyodbc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;connect&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;connStr&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:08:18 GMT</pubDate>
    <dc:creator>RandyBurton</dc:creator>
    <dc:date>2021-12-10T22:08:18Z</dc:date>
    <item>
      <title>PYODBC connection to Access not working within ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/pyodbc-connection-to-access-not-working-within/m-p/56222#M4450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a Python script that connects to an Access database, brings in some data, and then appends to a feature layer in ArcGIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This script runs okay as a stand-alone script, but I am having issues creating the connection to the Access DB from within ArcGIS Pro. I installed the PYODBC module in the Python manager. Then, when I try to make a connection to the Access DB with the same code that works in the stand-alone script, I get this error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;pyodbc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;InterfaceError&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'IM002'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This happens whether being run in a tool or whether the following code snippet is run from within the Python window in Pro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;conn &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; pyodbc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;connect&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=P:\\Conservation Programs\\Natural Heritage Program\\Data Management\\ACCESS databases\\POND_entry\\POND_be.accdb;'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any insight would be much appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2020 16:07:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pyodbc-connection-to-access-not-working-within/m-p/56222#M4450</guid>
      <dc:creator>MollyMoore</dc:creator>
      <dc:date>2020-05-08T16:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: PYODBC connection to Access not working within ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/pyodbc-connection-to-access-not-working-within/m-p/56223#M4451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you connecting to 32 or 64 bit Access?&amp;nbsp; You might try:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;connStr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
    r&lt;SPAN class="string token"&gt;"DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};"&lt;/SPAN&gt;
    r&lt;SPAN class="string token"&gt;"P:\Conservation Programs\Natural Heritage Program\Data Management\ACCESS databases\POND_entry\POND_be.accdb;"&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
conn &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; pyodbc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;connect&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;connStr&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:08:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pyodbc-connection-to-access-not-working-within/m-p/56223#M4451</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-10T22:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: PYODBC connection to Access not working within ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/pyodbc-connection-to-access-not-working-within/m-p/56224#M4452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahhh, I'm connecting to Access 32 bit. This is probably the issue, right?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a workaround for this at all other than the 64 bit install of Access?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2020 19:11:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pyodbc-connection-to-access-not-working-within/m-p/56224#M4452</guid>
      <dc:creator>MollyMoore</dc:creator>
      <dc:date>2020-05-08T19:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: PYODBC connection to Access not working within ArcGIS</title>
      <link>https://community.esri.com/t5/python-questions/pyodbc-connection-to-access-not-working-within/m-p/56225#M4453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might check out the answer given in this &lt;A href="https://stackoverflow.com/questions/45928987/is-it-possible-for-64-bit-pyodbc-to-talk-to-32-bit-ms-access-database"&gt;Stackoverflow discussion &lt;/A&gt;about the 64 and 32-bit versions of Access 2010.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2020 17:26:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pyodbc-connection-to-access-not-working-within/m-p/56225#M4453</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2020-05-11T17:26:35Z</dc:date>
    </item>
  </channel>
</rss>

