Question Locked

ERROR_STATE() in SQL2005

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Anybody help me explain the description of the return-value from ERROR_STATE(). Thanks

ERROR_STATE(): Returns the state number of the error that caused the CATCH block of a TRY?CATCH construct to be run. BUT I would like to know the meaning or context which the returned-number stands for. :'(

thanks for your help!

khanhmy

2 replies

by tony hopkinson

you can pick up error_text(), error_Number() and error_severity.

Just google error_state(), wodges of info on MSDN.

If you want to see the messages number, text, severity etc in 2005 use the view sys.messages, which is a friendly way of accessing the system table sysmessages.

This discussion is closed to new replies.