By any chance is there a "working" SQL statement before the @@ERROR is checked -
@@ERROR resets with every SQL statement...
so if there was an error in an SQL statement and @@ERROR was not checked immediately after this statement did not execute but rather was checked after another "correct" SQL execution then the value will be reset to 0....
I hope that makes sense....!!!
anyway - in the code just inlcude the following :
Declare @Err_Num Int
<UPDATE STATEMENT>
SET @Err_Num = @@ERROR
Print @Err_Num
This will help check if @@ERROR is being populated....