[python-win32] Looking for sample code

Tim Roberts timr at probo.com
Wed Sep 7 19:02:37 CEST 2005


On Tue, 06 Sep 2005 13:45:09 -0600, Jim Vickroy <Jim.Vickroy at noaa.gov> 
wrote:

>  
>
>I am not a MS Access user, but I have successfully used the information at
>
>http://www.connectionstrings.com/
>
>to access the information in Excel files via ODBC.
>


I'd like to comment just for completeness, in case someone reads these 
archives in the future.

ODBC does allow you to gain acess to the INFORMATION in an Access 
database.  It uses the Jet database engine to read the tables and queries.

However, that's all it can get to.  The macros, forms, reports, and VB 
code are NOT part of the database per se.  They are strictly part of the 
Access application.  In order to gain access to them, you have to use 
COM to fire up Access.Application, just as Bob suggested.

By the way, Bob, it isn't necessary for you to fetch the Access 
application version number to do the dispatch.  You can do this:

    a = win32com.client.Dispatch( "Access.Application" )

Through the magic of the registry, Access.Application is a "symbolic 
link" to Access.Application.10 (or whatever), which is itself a symbolic 
link to the UUID of the Access application.

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



More information about the Python-win32 mailing list