dbTalk Databases Forums  

Passing variables from a Package to a subpackage

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


Discuss Passing variables from a Package to a subpackage in the microsoft.public.sqlserver.dts forum.



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

Default Passing variables from a Package to a subpackage - 07-20-2006 , 08:39 PM






I set up the following items listed below. I am trying to pass CurBranch
from the outer to the inner package but cannot seem to make the connection.
How can CurBranch be connected to vartest ?

The Outer Package package contains two tasks:

SQL Task: Select CurBranch As CurBranch From TmpSRBst010
Input Parameter: None
Output Parameter: CurBranch (Rowvalue)

Package Task:Inner Package Global Variables: vartest1
Outer Package Global Variables: CurBranch

The Inner Package contains the following task:

SQL Task: Update Rmtest2 Set RptDir = ?

Input Parameters: vartest1
Output Parameters: None


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

Default RE: Passing variables from a Package to a subpackage - 07-21-2006 , 03:26 AM






- create a gv called vartest1 in your child package
- remove the inner package gv for your package task

Make sure the select-statement for CurBranch returns only 1 row/value.

See also this thread:
http://www.microsoft.com/technet/com...9-8c72fb339174

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

Default RE: Passing variables from a Package to a subpackage - 07-21-2006 , 03:30 AM



sorry, to quick with posting. vartest1 = CurBranch. so like this:

The Outer Package package contains two tasks:

SQL Task: Select CurBranch As CurBranch From TmpSRBst010
Input Parameter: None
Output Parameter: CurBranch (Rowvalue)

Package Task:Inner Package Global Variables: None
Outer Package Global Variables: CurBranch

The Inner Package contains the following task:

Create a gv called CurBranch (just to be sure. also enable "explicit
global variables"

SQL Task: Update Rmtest2 Set RptDir = ?

Input Parameters: CurBranch
Output Parameters: None

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

Default Re: Passing variables from a Package to a subpackage - 07-24-2006 , 04:54 PM



Hello rmcompute,

I would be tempted to call the inner package through the DTS object model
in an active Script task. This way you have a huge amount of control over
the child package.


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
I set up the following items listed below. I am trying to pass
CurBranch from the outer to the inner package but cannot seem to make
the connection. How can CurBranch be connected to vartest ?

The Outer Package package contains two tasks:

SQL Task: Select CurBranch As CurBranch From TmpSRBst010
Input Parameter: None
Output Parameter: CurBranch (Rowvalue)
Package Task:Inner Package Global Variables: vartest1
Outer Package Global Variables: CurBranch
The Inner Package contains the following task:

SQL Task: Update Rmtest2 Set RptDir = ?

Input Parameters: vartest1
Output Parameters: None



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.