Hi everyone!
I know how to return an error id in a stored proc with the @.@.ERROR
variable but is it possible to also return the corresponding error
message?
Thanks!Hi
You don't give the version of SQL Server you are using, SQL Server 2005 has
a ERROR_MESSAGE() function. For SQL 2000 you could try looking up the error
message number in master..sysmessages but you won't get the substituted
values.
John
"grosdug@.hotmail.com" wrote:
> Hi everyone!
> I know how to return an error id in a stored proc with the @.@.ERROR
> variable but is it possible to also return the corresponding error
> message?
> Thanks!
>|||Hi!
SQL 2000 it is, and I tried to get message from sysmessages and I
realised it doesn't substitute the varaibles as you suggest.
So, is there any way to get the message with substitued values?
Thanks!|||Hi
Not that I know of, although it is available on the client.
John
"grosdug@.hotmail.com" wrote:
> Hi!
> SQL 2000 it is, and I tried to get message from sysmessages and I
> realised it doesn't substitute the varaibles as you suggest.
> So, is there any way to get the message with substitued values?
> Thanks!
>|||Allright, thanks a lot!
No comments:
Post a Comment