Home All Groups Group Topic Archive Search About

@@Error problem: Critical errors

Author
9 Nov 2006 5:53 AM
MarkusJNZ
Hi, I am trying to catch a critical error. The code below should
deliberately fail as it tries to insert an string into a table
attribute.

Sure enough the update fails but I can't seem to catch the error

UPDATE IdentityCheck SET DateInserted='INVALIDDATE'
if @@error<>0
BEGIN
print 'An error has occurred'
END       

Help appreciated
Thanks
Markus

AddThis Social Bookmark Button