Script Component Reading Passed in Variables -
01-25-2010
, 11:18 AM
I have two Input Columns AddmissionDateStart and AddmissionDateEnd and I am
not able to access the value inside the variables in the script? The example
does not seem to work it says the variable cannot be found and that the name
of the variable may have changed. How can I find out what the names are for
these two variable? And the code correct for access the values in these
variable?
Dim vars As IDTSVariables100
Me.VariableDispenser.LockForRead("AddmissionDateSt art")
Me.VariableDispenser.LockForRead("AddmissionDateEn d")
Me.VariableDispenser.GetVariables(vars)
' Verify that the variable is locked before unlocking.
Dim myVar As Variable
For Each myVar In vars
MsgBox(myVar.Name)
MsgBox(myVar.Value.ToString())
Next
I Get This Error
"The variable cannot be found. This occurs when an attempt is made to
retrieve a variable from the Variables collection on a container during
execution of the package, and the variable is not there. The variable name
may have changed or the variable is not being created."
Mike |