Run DTS Jobs within a DTS Job (Active X)

Last Post 21 May 2007 10:54 AM by GoodFella3993. 0 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
GoodFella3993
New Member
New Member

--
21 May 2007 10:54 AM
I have a DTS job (posted in another topic) that checks to see if todays date is the beginning of the fiscal month. If todays date is the begining of the fiscal month it runs through a step (ActiveX Script Task) that will 'kick off' another DTS job. (In the future, I want to be able to have a list of jobs (different reports) within this step.

I have been toying with code in similar to this but cant seem to get it to work:

Function Main()

Set oPKG = CreateObject("DTS.Package")
oPKG.LoadFromSQLServer ".", , , 256, , , , "Fiscal Reward Report 2"
oPKG.Execute
oPKG.Uninitialize()
Set oPKG = Nothing


Main = DTSTaskExecResult_Success

End Function

------
-----

I am not strong with VB code. Thank you for any help.


Acceptable Use Policy
---