> Hello,
Hi Alex,
> I have an SSIS VB.NET Script Task that is a starting task in an SSIS
> package. Since the package could be executed either independently, or
[quoted text clipped - 4 lines]
> 1) ... = CStr(Dts.Variables("System::PackageName").Value
> 2) ... = CStr(Dts.Variables("PackageName").Value)
Actually it seems as you the correct code to retrieve the value...
apart a parenthesys missing in the first one
> I tried to include it into the list of Read-Only Variables of the
> Task, or do without it.
[quoted text clipped - 11 lines]
> VB.NET Script task?
> What do I miss in this User Variable / Expression setup?
I created a package with a single task: Script Task. In its properties
I set "PackageName" in the ReadOnlyVariables property (it worked for
ReadWriteVariables as well).
And this is the code I added in the Main() subroutine:
MsgBox(CStr(Dts.Variables("System::PackageName").Value))
I tested without the part "System::" and it worked too.
Well really I don't understand why you could get the error but check
it out...
> Thanks in advance.
>
> Alex
You're welcome ;)
HTH
M.
fastthinker - 29 Jul 2008 19:01 GMT
> On 28 Lug, 20:57, fastthinker <quickerm...@gmail.com> wrote:> Hello,
>
[quoted text clipped - 47 lines]
>
> - Show quoted text -
Well, I solved my prolem with the help of VariableDispenser and
dynamic system/user variable locking.
Matteus, thanks for your help suggestions.
Alex