Newbie Q: Win32, COM, Dispatch, Oracle OLE

Torgo Jr torgojr at my-deja.com
Mon May 1 10:25:23 EDT 2000


I'm confused on how to implement Oracles Objects For OLE in Python.
I browsed this newsgroup and came up with using "makepy.py -i"
to set the module correctly.  What I want to do is create a
OraSession object, set some parameters, and call a method in OraSession
that returns an OraDatabase object, but I am not sure what I am doing
wrong:

>>> from win32com.client import gencache
>>> mod = gencache.EnsureModule('{F2D4ED20-FFD3-101A-ADF2-
04021C007002}', 0, 3, 0)
>>> # previous works fine, can see __dict__.keys() entries
>>> oraS = mod.OraSession()  # fails
Traceback (innermost last):
  File "<interactive input>", line 1, in ?
  File "win32com\gen_py\F2D4ED20-FFD3-101A-ADF2-04021C007002x0x3x0.py",
line 160, in __init__
    oobj = pythoncom.new(self.CLSID)
com_error: (-2147221164, 'Class not registered', None, None)
>>>

First, how do I get an OraSession object, and second, do I have to do
anything special to get it to return an OraDatabase object?  The
OLE objects work on my machine in JScript, so they are registered
and work fine.

--
"Did I mention I'm immense and immortal?"
Joel Robinson


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list