dbTalk Databases Forums  

Sub Package Global Varialbe Loses Value

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Sub Package Global Varialbe Loses Value in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bill page
 
Posts: n/a

Default Sub Package Global Varialbe Loses Value - 10-07-2004 , 05:41 PM






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



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Sub Package Global Varialbe Loses Value - 10-09-2004 , 05:57 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


"bill page" <bill-insert-at-digitalgarden.com> wrote

Quote:
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





Reply With Quote
  #3  
Old   
bill page
 
Posts: n/a

Default Re: Sub Package Global Varialbe Loses Value - 10-12-2004 , 08:13 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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.