How to assign outer global variables to inner''s

  • I have a package which will call a couples of "execute package task".

    so I want to init the inner package's globle varibles, how can I do that with an ActiveX script?

    Actually, I want to know how to get the inner package object, so I can:

    oPkg.GlobalVariables("ChildVar").Value = DTSGlobalVariables("ParentVar").Value

    thanks!!!

  • See this site for an example:

    http://www.sqldts.com/default.aspx?215

    Greg

    Greg

  • thanks, and I've seen this before.

    actually I don't want to load the inner package in ActiveX code like:

     Set oPkg = CreateObject("DTS.Package")

    ' Assign parameters

    sServer = "(local)"

    sUID = ""

    sPWD = ""

    iSecurity = DTSSQLStgFlag_UseTrustedConnection

    sPkgPWD = ""

    sPkgName = "MyChildPackage"

    ' Load Child Package

    oPkg.LoadFromSQLServer sServer, sUID, sPWD, iSecurity , sPkgPWD, "", "", sPkgName

    the inner packge is already dragged in my package designer.

    all I want to do is something like:

    innerPackage = findInnerPackageByName('taskName')

    any idea?

     

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

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