Access, Field names, mxODBC

David Bolen db3l at fitlinxx.com
Thu Jan 18 18:18:17 EST 2001


vmarkwart at my-deja.com writes:

> I'm using the mxODBC.Windows module with an Access database. Can anyone
> tell me, or point me to an SQL or other statement which can return the
> field names returned from a query.

Once you have made the query, you can use <cursor>.description, where
<cursor> is your cursor for the query, which is a tuple of tuples,
with each inner tuple representing a column of the query.

I haven't done this with Access myself (only with other databases),
but I'd presume the ODBC method to Access works the same way.

This method and the per-column tuples are documented in the Python
DB-API html files that come with mxODBC.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list