Do you know how to use Script Tasks? I use them to check the values of my variables after the variables have been set.
Here are instructions in case you don't know how to use it.
Add Script Task right after the step that loads the variable value. (This is important as adding it before the variable is loaded will not give you the answer you need).
Choose Visual Basic as the script language in Script tab. (If you don't do this first, it will default to C# and you won't be able to change it short of deleting and recreating the task). C# is fine, BTW, if you know how to program it. This example uses a Visual Basic command.
In ReadOnlyVariables, put the variable names you want to check.
Click Edit Script.
Under Public Sub Main(), put the following code (do not put a single quote before it!):
MsgBox("This is the value of my variable named XYZ " + Dts.Variables("XYZ").Value.ToString)
XYZ, is the name of the variable you are reading. You can output multiple variables to a single message box command, but I prefer to do them one at a time so I can see them all.
When you run the package and it reaches this step, a little popup box will appear with your sentence and the value of the variable. If the sentence ends at "named XYZ" and nothing is after it, or if the popup message is blank, you've somehow got a NULL in your variable.
The package will stop until you click OK on this message box. Once you click OK, then it will continue on.
Usually you'll see an error in the path name at this point, or indications that the variable is not being loaded correctly. This is an essential troubleshooting tool for variables (though there may be others) that will help you nail down the problem.
Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog
, and Twitter
.Freelance Writer: ShadowrunLatchkeys: Nevermore
, Latchkeys: The Bootleg War
, and Latchkeys: Roscoes in the Night
are now available on Nook and Kindle.