Solved

SSIS ScriptTask:  How to do UpperCase(StringVariable)

Posted on 2008-10-28
4
1,231 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
  • 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how the fundamental information of how to create a table.

786 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