all groups > sql server dts > october 2004 >
You're in the

sql server dts

group:

Sub Package Global Varialbe Loses Value


Sub Package Global Varialbe Loses Value bill page
10/7/2004 6:41:48 PM
sql server dts:
I 'm try to write a large package. It has several sub packages. Mostly
this works ok as I'm passing down global parameters. The latest one I have
written needs to pass back an internal database id (from an insert) to be
used several tasks later. I have debugging output that suggests that I am
correctly setting the value of the global variable (i.e. i ask for it again
in the sub package script and it has the new value). However, when I try to
use the value, it has the value it had prior to the insert call returning
the new id. I can copy the script from the sub package and paste it into an
active-x script in the main package and it works as desired. The problem
with having the script in the main package is that I would need to duplicate
it 26 times, changing one passed in parameter, thus the desirability of
making this a sub package. I went to the MS knowledge base and found an
article suggesting that this should work.

Any ideas?

thanks

bill

Re: Sub Package Global Varialbe Loses Value Allan Mitchell
10/9/2004 11:57:49 AM
When I need to retrieve values from sub packages in my main package I tend
to call the package through an Active Script task using he Object model.


--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


[quoted text, click to view]

Re: Sub Package Global Varialbe Loses Value bill page
10/12/2004 9:13:50 AM
thanks. further research has indicated that scripting the object model may
be the ONLY way to do it. A bit of a pain in the butt. But, that has
worked. again thanks

bill

AddThis Social Bookmark Button