467,135 Members | 1,214 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,135 developers. It's quick & easy.

ADO and Makepy

Hi,

I ran makepy for ADO. After I installed a new version of python I have this
error:

Do you know why could I have this error?
from ADODB import Connection,Recordset conn = Connection()

Traceback (most recent call last):

File "<interactive input>", line 1, in ?

File "C:\Python2\lib\site-packages\win32com\client\__init__.py", line 479,
in __init__

if oobj is None: oobj = pythoncom.new(self.CLSID)

TypeError: Only strings and iids can be converted to a CLSID.

I have run makepy again but it does not work

egards

Jul 18 '05 #1
  • viewed: 1833
Share:
1 Reply
Alv Mart wrote:
Hi,

I ran makepy for ADO. After I installed a new version of python I have this
error:

Do you know why could I have this error?
>>> from ADODB import Connection,Recordset
conn = Connection()


You shouldn't need to import the makepy generated module manually. You
should just be able to use win32com.client.Dispatch("ADO.Connection").

This will magically use a Connection class from the makepy module. You
can also avoid manually running makepy, by calling gencache.EnsureModule
- run "makepy.py -i" for details.

Mark.

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Gerson Kurz | last post: by
reply views Thread by Jim Kerr | last post: by
2 posts views Thread by Svenn-Ivar Svendsen | last post: by
2 posts views Thread by nvhengr@gmail.com | last post: by
1 post views Thread by Martin Stettner | last post: by
1 post views Thread by Steve M | last post: by
1 post views Thread by Chris Curvey | last post: by
4 posts views Thread by suzhi18@googlemail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.