Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Help on sp_oamethod and EnumJobHistory DMO

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-04-24 : 12:03:44
lee writes "Hi! I'm trying use the DMO method EnumJobHistory which requires a Job Object and the JobHistoryFilter.
I can set the properties on the Filter:
Exec @rtn = sp_OASetProperty @srvobj,'JobServer.JobHistoryFilter.OutcomeTypes', 0

But I can't figure out how to get the filter in the method that wants a job object that's under the server object (that lives in the house that Jack built.)

Assuming @srvobj= created & connected server object,
I think the idea is:
Exec @rtn = sp_OACreate 'SOMETHING.OTHER', @jobobj OUT
Exec @rtn = sp_OACreate 'BLAH', @jobfilterobj OUT
Exec @rtn = sp_OAMethod @jobobj, 'EnumJobHistory("BLAH")' @qr OUT

If so, can you help me fill in the SOMETHING.OTHER and the BLAH?
How do I hook it to the server object?
Thanks for any help!
[SQL 7.0 SP1, 2 & 3 (depending)]"
   

- Advertisement -