Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
Can't bind to sqldmo.backup's interface backupsink!
Versions des environnements
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?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement