General information
Category:
COM/DCOM and OLE Automation
Title:
Can't bind to sqldmo.backup's interface backupsink!
Hi,everybody:
I try to use eventhandle() to bind an sqldmo.backup's interface,so that i can make response to backup object's event. I find through Object browse,and determine to use the backupsink as it's interface.My code is here:
LOCAL oBakup as "sqldmo.backup"
oBakup = CREATEOBJECT("sqldmo.backup")
x=NEWOBJECT("myclass")
? EVENTHANDLER(oBakup, x)
DEFINE CLASS myclass AS session OLEPUBLIC
IMPLEMENTS BackupSink IN "sqldmo.backup"
PROCEDURE BackupSink_PercentComplete(Message AS STRING, Percent AS Number) AS VOID;
HELPSTRING "Percent completion message during Backup process"
* add user code here
ENDPROC
PROCEDURE BackupSink_NextMedia(Message AS STRING) AS VOID;
HELPSTRING "Request for next volume in backup"
* add user code here
ENDPROC
PROCEDURE BackupSink_Complete(Message AS STRING) AS VOID;
HELPSTRING "Backup has completed"
* add user code here
ENDPROC
ENDDEFINE
but, the line "? EVENTHANDLER(oBakup, x)" always return false, and I can't find any way to figure out Which error has happened.Does anybody have experience about this?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only