title: Select column names in a table using PyODBC
body: <p>I'm writing a Python program that selects some data from a Microsoft Access mdb file using PyODBC.</p>
  
  <p>I need to discover the column names of several different tables. In SQL Server, this can be accomplished by using a query like</p>
  
  <pre><code>SELECT c.name FROM sys.columns c, sys.tables t
  WHERE c.object_id = t.object_id
  AND t.name = tableName
  </code></pre>
  
  <p>But that query doesn't work in Access. With</p>
  
  <pre><code>SELECT MSysObjects.Name FROM MSysObjects
  WHERE (((MSysObjects.Flags)=0) AND ((MSysObjects.Type)=1))
  ORDER BY MSysObjects.Name
  </code></pre>
  
  <p>I can get a list of non-linked table names, but MSysObject doesn't seem to contain a list of column names.</p>
  
  <p>Is there a way to use SQL to grab the column names of a table in an Access database?</p>