in

jetlounge

the minty fresh blog that whitens your teeth!

SSIS: Multiple Variable Error in Script Transformation Data Flow

by David Leibowitz | March 27, 2008 | Comments: 1

When using the Script Transformation Editor in SQL Integration Services, you might want to pass in more than 1 variable to your script. Properties exist for ReadOnlyVariables and ReadWriteVariables, much like the Script Task Control Flow component. But there is one BIG difference.

You may be used to syntax for multiple variable listings in the Control Flow component such as
User:MyVariableA, User::MyVariableB

It makes sense, the instructions in the component clearly state:
"Comma separated list of variables to be made available for read and write access."

But if you use the syntax above in the Script Transformation, it will error with the message:


TITLE: Microsoft Visual Studio
------------------------------

Cannot show Visual Studio for Applications editor.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%u00ae+Visual+Studio%u00ae+2005&ProdVer=8.0.50727.762&EvtSrc=Microsoft.DataTransformationServices.DataFlowUI.SR&EvtID=CouldNotShowVsaIDE&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

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.


Resolution:
REMOVE THE SPACES IN BETWEEN YOUR VARIABLES.
Thats right, the Data Flow component will only work with the syntax:
User:MyVariableA,User::MyVariableB

del.ico.us digg this technorati BlinkList Furl reddit DotNetKicks google! live Facebook Stumble Upon Yahoo!




Comments

 

Narayan Pavgi said:

The way variables are required to be used in SSIS- it is not very convinient and full of small nuances that could easily have been handled by SSIS instead of the developer:

List cannot contain spaces; Accessing variables requires something like Dts.Variables("name-which-is case-sensitive-dont-make-a-single-typo-here"); Writing locking logic to get hold of a variable; etc. etc.

March 28, 2008 12:13 PM

Leave a Comment

(required)  
(optional)
(required)  
Add
Powered by Community Server (Non-Commercial Edition), by Telligent Systems