Im trying to assign datatable to the ssis object type variable by using below line,

Dts.Variables("uPlanDetailIdTable").Value = dtPlanDetailId

but im getting error says ,

Run-time exception thrown : Microsoft.SqlServer.Dts****ntime.DtsRuntimeExcepti on -
The element cannot be found in a collection. This error happens when you try to retrieve an element from a collection on a container during execution of the package and the element is not there.