Welcome to EMC Consulting Blogs Sign in | Join | Help

Steve Wright's Blog (2005 - 2012)

I have now left EMC Consulting, if you wish to continue to receive new content then please subscribe to my new blog here: http://zogamorph.blogspot.com

SSIS Execute SQL Task With VARCHAR(MAX)

While I was using the SSIS Execute SQL Task to return a single row result I getting the following error:

[Execute SQL Task] Error: An error occurred while assigning a value to variable "RestoreCmd": "The type of the value being assigned to variable "User::RestoreCmd" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object!."

This was happening becuase I was trying to assgin a varchar(max) result column to SSIS string variable.

There are two ways to solve this problem; one is to change the SSIS variable to object and convert each time it used to a string; the second way to solve this is to cast result column to max size limit.

 

Published 20 January 2006 17:41 by steve.wright
Anonymous comments are disabled

This Blog

News

Locations of visitors to this page
Powered by Community Server (Personal Edition), by Telligent Systems