Friday, March 9, 2012

Execute SQL Task Error

I have a stored procedure that accepts an integer as
input and sends a value out as type varchar(600).

When I use Execute SQL task with ADO.Net or ADO Connection
Manager and assign proper values for the parameters and
their direction, the execution of the task returns ONLY 1
character (first character)for the output parameter.

Sounds like a bug since I can't set the string length
anywhere in the data type.

Any help/work arounds would be greatly appreciated it.

ThanksThis is a shot in the dark, but maybe a UCS-2 string (Microsoft's favorite type of Unicode encoding) is being used, and being interpreted as one of the Windows proprietary 8-bit encodings (eg, windows-1252), and the first character is in the ASCII set (eg, a regular letter), so the second byte of its UCS-2 representation is a zero byte, and this is truncating the string.
If you don't follow that, perhaps try changing the return value to nvarchar(600).
Note however, that we're successfully passing back varchar values via Execute SQL
tasks.
|||N.S. Which build you were on?
Another possibility is if you were on an earlier build, we had a known issue using ADO.Net connection in ExecuteSQLTask to get the full string value from out parameters. If that's the case for you, try upgrade to our CTP16 release and you should see the fix.

Thanks|||

I am on Version 8.0.50215.44. I'll upgrade to CTP 16. Thanks.

No comments:

Post a Comment