Hi!
I try to execute SQL Task with simple statement
insert T (comment) values (@.Comment)
where comment is varchar(1000). I map package variable User::Comment (type string) to parameter @.Comment in SQL Task properties. But when length of User::Comment greater than 10 characters SSIS returns errors:
Error: 0x0 at Execute SQL Task 1: String or binary data would be truncated.
Error: 0xC002F210 at Execute SQL Task 1, Execute SQL Task: Executing the query "insert T (comment) values (@.Comment)" failed with the following error: "The statement has been terminated.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
The similar messages from this forum suggest using the OLEDB connection. I try this method too, but get the same result.
Error: 0x0 at Execute SQL Task 1: String or binary data would be truncated.
Error: 0xC002F210 at Execute SQL Task 1, Execute SQL Task: Executing the query "insert T (comment) values (?)" failed with the following error: "The statement has been terminated.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
What is it? Is this a bug, I made a mistake or I have SQL Server old version?
I have SQL 2005 (Developer Edition) 09.00.3054
TIA, Max.Aren't you missining the 'INTO' in the insert statement?
|||
Rafael Salas wrote:
Aren't you missining the 'INTO' in the insert statement?
That's an optional clause, technically, but it can't hurt to try it. Maybe the Execute SQL Task is a bit more rigid.
No comments:
Post a Comment