[python-win32] driving MS Access from python

Tim Roberts timr at probo.com
Mon Mar 13 23:38:22 CET 2006


On Mon, 13 Mar 2006 15:28:58 -0500, Phill Atwood <me at phillatwood.name>
wrote:

>Thanks.  This seems like a good idea.  I noticed also ADOdb for Python. 
>Would this work do you know?  Since I'm doing win/ms access I think I'll 
>need to use mxodbc but I don't know how to install that on Windows.
>
>In your example below it is not clear (to me) how to get the dimensions 
>of the recordset and navigate thru (eg. print) all the resultant 
>fields.  Is there something similar to the ADOdb for
>Python
>


One of the issues with Access is that there are an "embarrassment of
riches" of methods to get to an Access database on Windows.  You have
ODBC directly, mxodbc, Jet, DAO, Jet via ADODB, ODBC via ADODB, DAO via
ADODB.

ADODB is a very good way of doing it.  One of the advantages is that the
same code works for Postgres or MySQL; you just change the connection
string (although that's mostly true for ODBC, too).  Plus, by creating
an ADOX.Catalog object, you can stroll through the metadata as well. 
You can fetch the list of tables, and the fields within the tables, and
so on.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-win32 mailing list