Wednesday, November 17, 2010

get last error code on sql server

using special function as below
will return latest error's code on server.
(this will return information about only latest query)


select @@ERROR

No comments: