win32com question

Alex Martelli aleaxit at
Fri May 25 15:54:26 CEST 2001

"Uwe Schmitt" <schmitt at> wrote in message
news:9el8gl$6d2l5$1 at
> hi, i wanted to use win32com.client to accessa a database via ado.
> accordint to the reference of win32com.client i tried
> conn.Execute("select * from table;",
> and i got a errormessage that the attribute adOpenDynamic is not
> known.
> can anybody help me ?

Hmmm, funny.  Try the following...:

Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> from win32com.client.gencache import EnsureDispatch as disp
>>> x=disp('ADODB.Record')
>>> import win32com.client as w
>>> w.constants.adOpenDynamic

Does this work for you?  If not, you seem to have some serious
installation problem and might want to uninstall your Python
and install a known-good one (mine is standard 2.1 plus the
win32all from ActiveState).  But first try removing the gen_py
directory and running this again -- it might be corrupted,
or something.

If this snippet works, then there must be some problems in
your code before this point...


More information about the Python-list mailing list