There is nothing wrong with parsing a data table from an object. I saw Andy Leonard to do this on my ETL platforms.
You were on the right track, but you did not see the whole picture. This code sets an object of type Variable (approximately) to A. Then you try to access a property that does not exist.
Object A = Dts.Variables[0];
Your need to capture the value of a variable. You can do it as assignment A
Object A = Dts.Variables[0].Value;
Or, if you need to do something else with the actual variable, you save your current assignment of code A, and then access the Value property.
Object A = Dts.Variables[0]; DataTable B = (DataTable) A.Value; DataRow C = B.Row[0]; string x = C.Column[0].ToString();
The above code for datatable / datarow is approximate. An important care is to access the pluses that are stored in the SSIS variable, you need to access the value of the object.
source share