Problem with win32com
Syver Enstad
syver.enstad at sensewave.com
Thu Aug 10 15:13:09 EDT 2000
I don't know much Python but it looks like the dbEngine variable goes out of
scope and is garbage collected in your second example.
> def fct():
> from win32com.client import Dispatch
> dbEngine = Dispatch( "DAO.DBEngine")
>
> database = dbEngine.OpenDatabase( "c:\temp\essai.mdb")
> return database
> database = fct()
# dbEngine is no longer referenced by any object in your program here.
> defs = database.TableDefs
More information about the Python-list
mailing list