Variable types are strict, except for variables of type Object- SSIS 2008
Hi , I declared a user variable MINIODate as string in package level and assigned this variable in an execute sql task 2008 , where my source is ado.net and sql command is Select CSTR(MIN(IODate) ) as MINIODate from IOData ( This is source table available in MSAccess DB) , The above senario working fine in 2005. During the run time in 2008 i am getting the following error [Execute SQL Task] Error: An error occurred while assigning a value to variable "MINIODate": "The type of the value being assigned to variable "User::MINIODate" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object.
October 28th, 2010 4:44am

Why not declare IODate as string variable?Regards, Raunak J
Free Windows Admin Tool Kit Click here and download it now
October 28th, 2010 5:20am

My variable i have declared as a string only Rgds, Thiruna
October 28th, 2010 6:09am

What is the need to Type cast it to string as you are using the CStr?Regards, Raunak J
Free Windows Admin Tool Kit Click here and download it now
October 28th, 2010 8:55am

CSTR used for convert to string the given IODate Rgds, Thiruna
October 28th, 2010 9:10am

Hi Thiruna, I can reproduce the issue. The cause for the issue is we set the ResultSet property to be "Full result set" in the "Execute SQL Task" task. Since the query "Select CSTR(MIN(IODate) ) as MINIODate from IOData " will return only one single row, we need to set the "ResultSet" to be "Single row", and in the "Result Set" tab, set the "Result Name" to be 0. If you have any more questions, please feel free to ask. Thanks, Jin ChenJin Chen - MSFT
Free Windows Admin Tool Kit Click here and download it now
November 1st, 2010 5:20am

Hi, Already i have set resultset is Single Row in my Execute SQL Task Editor. That query working fine in MS Access Query window.
November 1st, 2010 8:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics