[python-win32] DispatchWithEvents and ADO

Brad Posthumus mcgooly at yahoo.com
Thu Mar 9 18:34:49 CET 2006


--- Mark Hammond <mhammond at skippinet.com.au> wrote:

> Oops - that last mail snuck away from me!
> 
> Enabling "debug mode" for event handlers is tricky -
> you probably
> could open the makepy generated file and locate the
> function in the events
> class:
> 
> 	def _query_interface_(self, iid):
> 		import win32com.server.util
> 		if iid==self.CLSID_Sink: return
> win32com.server.util.wrap(self)
> 
> to pass True as a second arg to "wrap" - that should
> enable standard COM
> server debugging, which should spew output to
> Pythonwin's Tools -> Remote
> Trace Collector.  You should see the "member not
> found" errors reflected
> there.  Adding all necessary methods until that
> output is (mainly) silent
> may avoid the error - but as mentioned in the first
> email, this is
> speculation that ADO is getting upset about the
> event handler not having all
> methods implemented.

Your debugging advice sounds like its worth
investigating, perhaps beyond my technical expertise
but that's how you learn (I hope). It's amazing how
much useful functionality it out there that I simply
haven't tested yet.

> I'm afraid I'm not sure exactly what you are asking
> here.  By Python getting
> ahead, I assume you really just mean that ADO is
> getting ahead (and
> therefore would when called from any language).  If
> ADO is working somehow
> asynchronously, then the solution to that probably
> lies inside ADO itself
> rather than in Python.

I agree, it would be nice if ADO took care of this on
its side but unfortunately it doesn't seem to be the
case. We've been using Sleep commands to after each
AdoConnection.Execute statement but that's a terribly
weak work-around, hence my investigation into
DispatchWithEvents.

By the way Mark, I (and likely most others) appreciate
the fact you take the time out to help us out on this
mailing list. It's great to get Win32Com advice from
the actual developer. 



	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com


More information about the Python-win32 mailing list