I lost my touch in SSIS. I use an execute task with a simple query select count(column) from table. Result single row, I set up the variable:
this is my scrip in C#:
public void Main() { // TODO: Add your code here //Dts.Variables["User:Variable"].Value=Convert.ToString(Dts.Variables["User:Variable1"].Value; String MyVar = Dts.Variables["User:Variable1"].Value.ToString(); MessageBox.Show ("MyVar"); Dts.TaskResult = (int)ScriptResults.Success; }
but I retrieve the error above.