Set global variable = package name

  • I'm trying to set a global variable = the package name in an activeX task. It's driving me crazy that I can't figure out something that seems to be so simple. Can anyone help out?

    Thanks

    -D

  • This should do the trick:

    Function Main()

    DIM oPkg

     SET oPkg = DTSGlobalVariables.Parent

     DTSGlobalVariables("g_PackageName").Value = oPkg.Name

     msgBox("Package Name = " & DTSGlobalVariables("g_PackageName").Value)

     Main = DTSTaskExecResult_Success

    End Function

    Good Luck,

    Darrell

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

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