How to get error description from @@error | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to get error description from @@error

In a proc, how do i get the error description for the error?
We can get the error code via @@error but how do we get the exact description/ Thanks.
You can capture a SQL error within a stored procedure or within your client development tool.
This is where TRY..CATCH in SQL 2005 comes: link and…ringtheerrordescriptioninastoredprocedure.asp fyi. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
This might as well be helpful.
Dilli Grg (1 row(s) affected)