Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't bind to sqldmo.backup's interface backupsink!
Message
From
15/11/2004 08:14:56
F Bilo
Bilo Office
Fuyang, China
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Can't bind to sqldmo.backup's interface backupsink!
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Miscellaneous
Thread ID:
00961356
Message ID:
00961356
Views:
57
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
Map
View

Click here to load this message in the networking platform