Parent Package Problem

  • I have a DTS package that I have set up to control a number of child packages, this has been running successfully for some time now, until today

    It is basically an ActiveX Task that takes the global variables from the parent and passes them to the children and executes them,the parent package still runs successfully but does not run the children...

    The funny thing is the children packages work if I run them individually...

    Function Main()

     Main = DTSTaskExecResult_Success

     Dim oPkg

     Dim strUser, strPassWord,strServer

     

     strUser = DTSGlobalVariables("UserName").Value

     strPassWord = DTSGlobalVariables("PassWord").Value

     strServer = DTSGlobalVariables("Server").Value

      

     Set oPkg = CreateObject("DTS.Package")

     oPkg.LoadFromSQLServer strServer,strUser,strPassword, DTSSQLStgFlag_Default , , , , "FM_SW_Data_Load"

     oPkg.GlobalVariables("ImportDate").Value = DTSGlobalVariables("ParentDate").Value

     oPkg.GlobalVariables("ImportID").Value = DTSGlobalVariables("ParentID").Value

     oPkg.Execute

     oPkg.Uninitialize

     Set oPkg = Nothing

     Set oPkg = CreateObject("DTS.Package")

     oPkg.LoadFromSQLServer strServer,strUser,strPassword, DTSSQLStgFlag_Default , , , , "FM_NE_Data_Load"

     oPkg.GlobalVariables("ImportDate").Value = DTSGlobalVariables("ParentDate").Value

     oPkg.GlobalVariables("ImportID").Value = DTSGlobalVariables("ParentID").Value

     oPkg.Execute

     oPkg.Uninitialize

     Set oPkg = Nothing

    End Function

  • Make sure activate Execute on Main Package Thread (workflow properties) and put this line at the end of the script: Main = DTSTaskExecResult_Success

    JFB

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply