Home > Archive > MS SQL Server DTS > March 2006 > Dynamically setting inner package name









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Dynamically setting inner package name
Greg N.

2006-03-29, 9:29 am

I have a situation where I have an outer package that does some basic
housekeeping stuff for loading new data, but the load itself will depend on
who we received the data from. This information is set in an INI file and
mapped to globals in a dynamic properties task. I am trying to use a VBscript
ActiveX Script task to change the name of the inner package in the Execute
Package Task. However, I keep getting a syntax error. Here is the relevant
code:

Dim oPkg, tskInnerPkg

' Set inner package name

set oPkg = DTSGlobalVariables.Parent
set tskInnerPkg = oPkg.tasks(" DTSTask_DTSExecutePa
ckageTask_1")
tskInnerPkg.PackageName = DTSGlobalVariables("LoadPkgName").Value 'BUG!!!
Puking on PackageName property

set oPkg = Nothing
set tskInnerPkg = Nothing

I can very likely work around this by setting the property directly through
the dynamic properties task; however, I'd still like to know what is wrong
with the above code just for my own peace of mind (this is really starting to
bug me as I can't see the problem!)
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com