Showing posts with label thedatatypes. Show all posts
Showing posts with label thedatatypes. Show all posts

Tuesday, February 14, 2012

CATCH BLOCK ERRORS - what are the datatypes?

Hi,
I am writing my catch block to log error messages to a table. For this
purpose I am creating a log table, but I need to know what are the
datatypes? I can't seem to find this info.
I need the datatype of the following:
ERROR_NUMBER() AS ErrorNumber,
ERROR_SEVERITY() AS ErrorSeverity,
ERROR_STATE() as ErrorState,
ERROR_PROCEDURE() as ErrorProcedure,
ERROR_LINE() as ErrorLine,
ERROR_MESSAGE() as ErrorMessage;
Thanks
Hi
These are documented in Books online see erturn type in
http://msdn2.microsoft.com/en-us/library/ms175069.aspx etc..
Numbers are int, procedure is nvarchar(126) and message is nvarchar(4000).
John
"tootsuite@.gmail.com" wrote:

> Hi,
> I am writing my catch block to log error messages to a table. For this
> purpose I am creating a log table, but I need to know what are the
> datatypes? I can't seem to find this info.
> I need the datatype of the following:
> ERROR_NUMBER() AS ErrorNumber,
> ERROR_SEVERITY() AS ErrorSeverity,
> ERROR_STATE() as ErrorState,
> ERROR_PROCEDURE() as ErrorProcedure,
> ERROR_LINE() as ErrorLine,
> ERROR_MESSAGE() as ErrorMessage;
> Thanks
>

CATCH BLOCK ERRORS - what are the datatypes?

Hi,
I am writing my catch block to log error messages to a table. For this
purpose I am creating a log table, but I need to know what are the
datatypes? I can't seem to find this info.
I need the datatype of the following:
ERROR_NUMBER() AS ErrorNumber,
ERROR_SEVERITY() AS ErrorSeverity,
ERROR_STATE() as ErrorState,
ERROR_PROCEDURE() as ErrorProcedure,
ERROR_LINE() as ErrorLine,
ERROR_MESSAGE() as ErrorMessage;
ThanksHi
These are documented in Books online see erturn type in
http://msdn2.microsoft.com/en-us/library/ms175069.aspx etc..
Numbers are int, procedure is nvarchar(126) and message is nvarchar(4000).
John
"tootsuite@.gmail.com" wrote:

> Hi,
> I am writing my catch block to log error messages to a table. For this
> purpose I am creating a log table, but I need to know what are the
> datatypes? I can't seem to find this info.
> I need the datatype of the following:
> ERROR_NUMBER() AS ErrorNumber,
> ERROR_SEVERITY() AS ErrorSeverity,
> ERROR_STATE() as ErrorState,
> ERROR_PROCEDURE() as ErrorProcedure,
> ERROR_LINE() as ErrorLine,
> ERROR_MESSAGE() as ErrorMessage;
> Thanks
>