dbTalk Databases Forums  

Script Component Reading Passed in Variables

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Script Component Reading Passed in Variables in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hotwheels
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.