ANSI_WARNINGS behaviour changed between 2000 and 2008?

  • Quickie - I am not lookign for a solution to the error. I'm asking why it behaves differently on 2000 and 2008...

    We have a stored proc that populates a temp table from a stored proc filling in a char(35) column. On 2000 if the data coming back is more than 35 it truncates it (and we are fine with that) and ANSI_WARNINGS is turned OFF at the start of the stored proc and its all good. It truncates and is fine.

    In our new 2008 environments this same proc (with ansi_warnings off included) fails with the typical error of "string or binary would be truncated. Now I can get around this easily enough so please no advice there, but its bugging me that this works on 2000 but not 2008.

    I have checked ANSI_WARNINGS is off for the active connection and it still fails.

    EDIT: I've even stuck a DBCC USEROPTIONS before and after the "ansi warnings off" in the stored proc and can see it has turned the option off.

    Any ideas anyone?

  • Love it! Nothing like wasting your afternoon fault finding a known bug

    http://support.microsoft.com/kb/971057/

  • Shark Energy (5/19/2011)


    Love it! Nothing like wasting your afternoon fault finding a known bug

    http://support.microsoft.com/kb/971057/

    Awesome, thanks for the feedback!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply