<?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 Example of pyodbc query to table in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/example-of-pyodbc-query-to-table/m-p/313229#M24347</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I formerly had a model to update a domain that used a database connection to an Access query in an (*.accdb).&amp;nbsp; Unfortunately, I've been experiencing the same problems found at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/4588-ArcGIS-Desktop-amp-MS-Access-Joined-Fields-Suddenly-Null-amp-Blob-Values"&gt;http://forums.arcgis.com/threads/4588-ArcGIS-Desktop-amp-MS-Access-Joined-Fields-Suddenly-Null-amp-Blob-Values&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and bug &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/TklNMDcyOTk2"&gt;NIM072996&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So since the simple way is no longer working, I'm thinking the best way would be to abandon trying to use a database connection and instead use pyodbc to pass the query to a dictionary, convert the dictionary to a table, then to the new domain, or more directly from dictionary to domain if possible.&amp;nbsp; Unfortunately, I've never worked with a dictionary type before, and I need examples of how to make the pyodbc object into a dictionary and then convert it to a dbf or some other table format. The SQL for the query is simple: "SELECT tblWorkers.WorkerID, [tblWorkers.LastName]&amp;amp;" "&amp;amp;[tblWorkers.FirstName] as FullName FROM tblWorkers WHERE (((tblWorkers.WeedTrkr)=True));"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Feb 2012 20:20:54 GMT</pubDate>
    <dc:creator>RussellKallstrom</dc:creator>
    <dc:date>2012-02-24T20:20:54Z</dc:date>
    <item>
      <title>Example of pyodbc query to table</title>
      <link>https://community.esri.com/t5/python-questions/example-of-pyodbc-query-to-table/m-p/313229#M24347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I formerly had a model to update a domain that used a database connection to an Access query in an (*.accdb).&amp;nbsp; Unfortunately, I've been experiencing the same problems found at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/4588-ArcGIS-Desktop-amp-MS-Access-Joined-Fields-Suddenly-Null-amp-Blob-Values"&gt;http://forums.arcgis.com/threads/4588-ArcGIS-Desktop-amp-MS-Access-Joined-Fields-Suddenly-Null-amp-Blob-Values&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and bug &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/TklNMDcyOTk2"&gt;NIM072996&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So since the simple way is no longer working, I'm thinking the best way would be to abandon trying to use a database connection and instead use pyodbc to pass the query to a dictionary, convert the dictionary to a table, then to the new domain, or more directly from dictionary to domain if possible.&amp;nbsp; Unfortunately, I've never worked with a dictionary type before, and I need examples of how to make the pyodbc object into a dictionary and then convert it to a dbf or some other table format. The SQL for the query is simple: "SELECT tblWorkers.WorkerID, [tblWorkers.LastName]&amp;amp;" "&amp;amp;[tblWorkers.FirstName] as FullName FROM tblWorkers WHERE (((tblWorkers.WeedTrkr)=True));"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 20:20:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/example-of-pyodbc-query-to-table/m-p/313229#M24347</guid>
      <dc:creator>RussellKallstrom</dc:creator>
      <dc:date>2012-02-24T20:20:54Z</dc:date>
    </item>
  </channel>
</rss>

