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 11:39am
My variable i have declared as a string only
Rgds,
Thiruna
Free Windows Admin Tool Kit Click here and download it now
October 28th, 2010 1:04pm
CSTR used for convert to string the given IODate
Rgds,
Thiruna
October 28th, 2010 4:08pm
Hi,
Already i have set resultset is Single Row in my Execute SQL Task Editor. That query working fine in MS Access Query window.
Free Windows Admin Tool Kit Click here and download it now
November 1st, 2010 8:57am
Hi Triru_BI,
Coudl you please try to delete the variable, and then re-add it to check if the issue is solved?
Thanks,
Jin ChenJin Chen - MSFT
November 3rd, 2010 1:47am
Hi,
Deletion of variable and recreation of that already i have done, however the error persist.
Thanks,
Thiru
Free Windows Admin Tool Kit Click here and download it now
November 8th, 2010 3:11am
Hi,
I have done that by using Script Task instead of Execute SQL Task.
Dim connString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Access\Card Jull27.accdb;Persist Security Info=False;"
Dim MyConnection As OleDbConnection = Nothing
Dim cmd As OleDbCommand
MyConnection = New OleDbConnection(connString)
MyConnection.Open()
cmd = New OleDbCommand("select CSTR(MIN(IODate)) as MINIODate from IOData", MyConnection)
Dim msda As OleDbDataAdapter = New OleDbDataAdapter(cmd)
Dim dsData As DataSet = New DataSet()
msda.Fill(dsData)
Dim a As String = dsData.Tables(0).Rows(0)("MINIODate").ToString
MINIODate = a
Tnks,
Thiru
November 9th, 2010 11:10pm