if i try to execute a system SP like 'sp_addmessage' then the value of @@error is 0 instead of the actual error number which should be 15009.
for other scenarios in case of errors i get the actual error number in @@error.
similiarly for other sp_ Stored Procs if an error is returned then i am not able to get its error number.
However when i give the command raiseerror(15009,16,1) and then if i check the value of @@error in this case i get the error number.
please help.....