I am trying to program a For Loop container and cannot get the For Loop Properties expressions set. I have simplified the expression to the following:
I get the following error messages:
Error at For Loop Container: Error code 0x80020005 occured attempting to convert from data type DT_WSTR to data type DT_DBTIMESTAMP.
Error at For Loop Container: Casting Expression "@Max_Load_Date" from data type "DT_WSTR" to data type "DT_DBTIMESTAMP" failed with error code 0XC00470C2.AND I FOUND THE FIX WHILE WRITING THIS POST.
I did not populate the variables with a default value. I left them blank. SSIS probably treats it as a blank and not a null. Thus causing the conversion errors. Populated the default values and all is good.
I figured I'd complete the post hoping it'll help someone else.