dbTalk Databases Forums  

DTS Global Variable

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


Discuss DTS Global Variable in the microsoft.public.sqlserver.dts forum.



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

Default DTS Global Variable - 07-17-2006 , 04:03 PM






Hi.

I have a DTS package that calls a Execute Package task. If I set the "Inner
Global Variables" of the Execute Package task, I can do the following inside
the Execute Package Task:

DTSGlobalVariables("IsSuccess").value = 0

After the Execute Package task, in an ActiveX Script task in the outer DTS
package, I am trying to reference the global variable, but it doesn't
recognize the global variable. So, when I do MsgBox, it shows nothing.

Can anyone explain how I can reference the global variable in the outer DTS
package?

Thanks.
J
--
Be Cool!

Reply With Quote
  #2  
Old   
Frans van Bree
 
Posts: n/a

Default RE: DTS Global Variable - 07-18-2006 , 03:58 AM






You can't. Both inner and outer are used to supply variables TO the child
package. Inner by setting a global variable that already exists in the child
package, outer by creating/setting a global variable in the child package
that already exists in the parent package.

Reply With Quote
  #3  
Old   
thejackofall
 
Posts: n/a

Default RE: DTS Global Variable - 07-18-2006 , 11:29 AM



In that case, couldn't I declare a global variable at the outer package, then
add the variable in the "outer global variables" of the Execute Package task,
which is the inner package. In this inner package, if I do

DTSGlobalVariable("IsSuccess") = 0, then, I should be able to accomplish this.

Am I right?

J
--
Be Cool!


"Frans van Bree" wrote:

Quote:
You can't. Both inner and outer are used to supply variables TO the child
package. Inner by setting a global variable that already exists in the child
package, outer by creating/setting a global variable in the child package
that already exists in the parent package.

Reply With Quote
  #4  
Old   
Frans van Bree
 
Posts: n/a

Default RE: DTS Global Variable - 07-19-2006 , 03:53 AM



No, this would create a different global variable called "IsSuccess" in the
child package. Although it has the same name as the one in the parent
package, the variables are unconnected (IsSuccess is not some sort of pointer
to the same memory location or a byref).

So, you parents' IsSuccess would be 0 and your child's IsSuccess would be 1.

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.