Re: Pass variables from parent DTS to child DTS package...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Darren Green (darren.green_at_reply-to-newsgroup-sqldts.com)
Date: 04/19/04


Date: Mon, 19 Apr 2004 22:41:48 +0100

In message <OJyBTQEJEHA.3104@TK2MSFTNGP10.phx.gbl>, Andreas Terzis
<gr8patra@pacbell.net> writes
>Darren,
>Thanks for the response. The child package is executed by itself
>sometimes by a job and runs let's say for the last month. Sometimes
>though, I need to have a job run which calls the parent package, which
>in turn calls the child package. The child package has all the logic
>for my report and the parent package only changes the OriginalDate and
>then executes the child package in a loop. Let's say that the child
>package uses an OriginalDate of '01-31-04' (and a TargetDate of
>'02-29-04'). When it is executed by itself (not called by the parent
>package), it gets data between those two dates. But I need to have the
>child package generate 13 reports sometimes, for trending purposes. The
>TargetDate always remains the same but the OriginalDate should be
>'01-31-03' in the first execution, '02-28-03' in the second and so on,
>up to '01-31-04'. That's why I need those OriginalDate instances change
>every time in the parent package. I guess I can eliminate the parent
>package text input file, but I am not sure if the user would want the
>historical data generated for 13 months or 25 or 6. Does that make
>sense? I am glad you got your example to work. I still cannot get mine
>to work. Is there any way you could e-mail me the two packages (if they
>still work after my latest explanation)? Basically, the OriginalDate in
>the child package should change each time the package is called by the
>parent package. That should be printed every time by the "msgbox"
>command (msgbox "ChildDTS - ..."). I would appreciate your help.
>Thanks,
>Andreas
>

Andreas,

If the child package is normally executed by itself from the job, what
sets the OriginalDate for that run? Is there some logic in the child
overwriting the variables supplied by the parent?

(I'll send the packages tomorrow as I'm on another machine now)

-- 
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com
PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org


Relevant Pages

  • Re: Passing Variables to another package
    ... >> variables in the outer package, also known as the parent package, or in ... >> you description this is package A. You select the parent package ... >> variables that you want to be passed into the child package, ... >> existing global variables of child package. ...
    (microsoft.public.sqlserver.dts)
  • Re: Child Package Wont Fail Parent
    ... version...that there is a link to another package and could choose to update ... > child package, not the NEWEST one. ... > that the parent will unambiguously call that package. ... > calling the child that you're thinking it's calling and you need to do ...
    (microsoft.public.sqlserver.dts)
  • Re: Scheduled Package dose not being instanciated more than once
    ... The same package cn be called at the same time multiple times. ... In the parent package you check a csv file. ... www.SQLDTS.com - The site for all your DTS needs. ... > each child package which referes to that stored procedure). ...
    (microsoft.public.sqlserver.dts)
  • Re: Possible Ada deficiency?
    ... I can do this with a non-child package. ... > access to all of the private area as well. ... > makes the packages containing the derived type a child package or not. ... have to be mentioned in the "parent". ...
    (comp.lang.ada)
  • Re: Scheduled Package dose not being instanciated more than once
    ... A way to control child package exeution would be to link them through ... >I have a Parent package which call different child packages.I have ...
    (microsoft.public.sqlserver.dts)