Solved

SSIS ScriptTask:  How to do UpperCase(StringVariable)

Posted on 2008-10-28
4
1,303 Views
Last Modified: 2013-11-10
Hi All

In an SSIS Script Task I'm trying to convert a string variable to upper case.

This line --> ConName.ToUpper <> "FRAMEWORK"  <-- returns the below compile error

Package Validation Error

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

Error at Initialize Connections: The task is configured to pre-compile the script, but binary code is not found. Please visit the IDE in Script Task Editor by clicking Design Script button to cause binary code to be generated.
 (Microsoft.DataTransformationServices.VsIntegration)


This line --> UPPER(ConName) <> "FRAMEWORK" <-- returns 'Name 'UPPER' is not declared.

Thanks in advance.
Jim
0
Comment
Question by:Jim Horn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 17

Expert Comment

by:HoggZilla
ID: 22823101
Usually the Script Task will underline your error, just like VB.net. Anything underlined?
Paste the Script Task code here so Experts can review. Thanks.
0
 
LVL 22

Accepted Solution

by:
PedroCGD earned 250 total points
ID: 22823112
Check this fix:
http://www.microsoft.com/downloads/details.aspx?familyid=2BA43893-EF6B-4019-9E7D-D8CC6C7B905D&displaylang=en

If not, check this:
http://support.microsoft.com/kb/953752/en-us

If not resolved yet, go to script task and make BUILD

helped?
regards!
0
 
LVL 17

Assisted Solution

by:HoggZilla
HoggZilla earned 250 total points
ID: 22824031
Make sure you have the string variable declared in the ReadWriteVariables property of the Script Task Editor. Make sure it is the correct name of your string varialbe and that your string variable has a Scope of the entire package, or at a minimum, the Scriipt Task.
Make sure the string variable has a value, at least a default value for compiling. I am not absolutely sure this is required, but does not hurt and removes the issue.
Here is a sample script task that worked for me.

Dim ConNameAsIs As String = Dts.Variables("MY_VARIABLE").Value.ToString
MsgBox(ConNameAsIs, , "As Is")
Dim ConName As String = Dts.Variables("MY_VARIABLE").Value.ToString.ToUpper
MsgBox(ConName, , "UpperCase")
 

script-task-variables.bmp
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question