How to get last full MS SQL Server error message?

Posted by JohnM2 on Stack Overflow See other posts from Stack Overflow or by JohnM2
Published on 2010-05-02T11:23:05Z Indexed on 2010/05/02 11:27 UTC
Read the original article Hit count: 228

Filed under:
|

I am aware of:

SELECT @@ERROR

but it will give me only an ERROR CODE (a number) and I need a full text message like:

Cannot insert duplicate key row in object 'dbo.TABLE_NAME' with unique index 'IX_ID_unique'. The statement has been terminated.

How can I do that in MS Sql Server 2005 ?

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about php