[python-win32] Re: Access and python

Tom ful_tom at yahoo.com
Fri Apr 18 01:01:21 EDT 2003


There is more ways how do it:

1. Simple use access command line options /compact or
/repair. For example :
msaccess.exe dbase.mdb /compact

More in MsAccess help or
http://support.microsoft.com/default.aspx?scid=KB;en-us;158937

2. Use automation

import win32com.client

access =
win32com.client.Dispatch("Access.Application.8")

dbName="c:\\source.mdb"
newName="c:\\new.mdb"

access.DbEngine.RepairDatabase(dbName)
# or access.DbEngine.CompactDatabase( dbName, newName)
access.Quit()
del access

Tomas Guano Fulajtar







__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com



More information about the Python-win32 mailing list