The error is thrown while trying to access system variables from within DTS Script Task.
String strPackageName = (string) Dts.Variables["System::PackageName"].Value;
Same results with other variables, such as System::MachineName...
Other "DTS" data is available, the following doesn't error out:
String strSourceFileName = (string) Dts.Connections["SourceConnectionFlatFile"].ConnectionString;
Does System::PackageName included in the ReadOnlyVariables or ReadWriteVariables?
James, it was not included in either. I added System::PackageName to ReadOnlyVariables and that resolved the issue.
Thank you for your assistance.
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.
Would you like to participate?