How to use Variables in different component

1. In Script Task component

Set Value:

Dts.Variables["ErrorMsg"].Value = string.Format("Connection Config Exception:{0}", ex.Message);
Dts.Variables["ErrorStatus"].Value = true;

Get Value:

string FileName = (string)Dts.Variables["FileName"].Value;

2. Execute SQL Task component

Set Value:

Get Value:

Thanks.

原文地址:https://www.cnblogs.com/vincentDr/p/3238021.html