Hi,
I tried the following:
[color=blue][color=green][color=darkred]
>>> from win32com.client import DispatchWithEve nts[/color][/color][/color]
[color=blue][color=green][color=darkred]
>>> class BackupEvent:[/color][/color][/color]
.... def OnPercentComple te(self, sMessage, nPercent):
.... print sMessage, nPercent
[color=blue][color=green][color=darkred]
>>> oSqlBackup = DispatchWithEve nts('SQLDMO.Bac kup', BackupEvent)[/color][/color][/color]
Traceback (most recent call last):
raise ValueError, "This COM object does not support events."
ValueError: This COM object does not support events.
SQLDMO.Backup is a COM object with EVENT, why the error "does not
support events"? I tried the demo of DispatchWithEve nts using IExplorer
and it's working, so I think the installation is correct. Is there
anyone facing the same problem?
Thanks,
Chandra
I tried the following:
[color=blue][color=green][color=darkred]
>>> from win32com.client import DispatchWithEve nts[/color][/color][/color]
[color=blue][color=green][color=darkred]
>>> class BackupEvent:[/color][/color][/color]
.... def OnPercentComple te(self, sMessage, nPercent):
.... print sMessage, nPercent
[color=blue][color=green][color=darkred]
>>> oSqlBackup = DispatchWithEve nts('SQLDMO.Bac kup', BackupEvent)[/color][/color][/color]
Traceback (most recent call last):
raise ValueError, "This COM object does not support events."
ValueError: This COM object does not support events.
SQLDMO.Backup is a COM object with EVENT, why the error "does not
support events"? I tried the demo of DispatchWithEve nts using IExplorer
and it's working, so I think the installation is correct. Is there
anyone facing the same problem?
Thanks,
Chandra