Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

An error occurs within different components (ForEach & SQL Task) when applying variables such as User::cnt and User::sum for instance.

But there is manually no mismatch to see regarding datatypes. Is there a missing SQL Server 2005 Hotfix to install or another frequently occuring open issue to resolve?

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

It works fine with SSIS 2012 but it is a requirement to deliver the same stuff in SSIS 2005. This is the reason concerning the old application version of SSIS.

Resolved: DB attribute was an int and SSIS required a LONG

share|improve this question
Nothing leaps to mind, could you provide some minimal reproduction code. – billinkc Oct 1 '13 at 11:54
Are the variables by chance 64 bit integers?… – brian Oct 1 '13 at 13:05
no, thanks for the url – mnemonic Oct 2 '13 at 9:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.