Re: Newbie Question on Variables

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



Randy:
You need to define the Variables before you can use them. And when you do,
pay particular attention to the Scope of the variables. One created in the
scope of a For Each loop will not be accessible to Tasks *outside* the loop.

Right click on the Control Flow and select Variables.
--
Todd C

"Tom Moreau" wrote:

You can access variables anywhere within a package. However, you still have
to specify whether you need read/write or just read access within a Script
task.

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau


"rminder" <rminder@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D27769A3-DAF9-4756-9638-B0F4654C98F3@xxxxxxxxxxxxxxxx
I am getting my feet wet in learning SSIS by taking over a somewhat complex
package. My question has to do with variables. In the Script Task Editor,
when I click on 'Script' on the left, on the right I see something called
ReadWriteVariables. When I enter variable names in this field, do I have
access to these variables anywhere in my package, or just the current
script?

Thanks very much - Randy


.



Relevant Pages

  • Re: readdir formulated badly? gives wrong count
    ... see the documentation (perldoc strict) for more explanation. ... Not to be obtuse but why is declaring in smallest scope important ... This script is a helper script, so why is declaring variables like: ... function or internal loop or other more limited scope. ...
    (perl.beginners)
  • Re: Does "my" vs "our" explain this problem?
    ... I have a script that calls a module. ... 'our' is the only way to "declare" a global variable*. ... who's scope happens to be the ... This is the global variable $myGlobal that belongs to the package main. ...
    (comp.lang.perl.modules)
  • Re: readdir formulated badly? gives wrong count
    ... The `warnings' part is clear enough but doesn't the -w flag do something ... Not to be obtuse but why is declaring in smallest scope important ... This script is a helper script, so why is declaring variables like: ... function or internal loop or other more limited scope. ...
    (perl.beginners)
  • Re: Name collisions in Monad
    ... We spent a lot of time working on the scoping rules in Monad. ... create a new scope when run, and variables _created_ in that new scope are ... script, call a function, or start a new instance of Windows Command ... $var is initially set to "init" in the function ...
    (microsoft.public.windows.server.scripting)
  • Re: Can com+ Hotfix Rollup Package 27 fix my memory problem with WSH. CreateObject/CreateScript?
    ... > these activities have effects that are felt outside of the scope of a script ... Of course in script, the object will be ... > Even the above definition makes no distinction between object variables ... a connection every time I read or write a key, ...
    (microsoft.public.scripting.wsh)