How to Handle the exceptions in Sqlsrver 2005??
Answer Posted / indraneelandhavarapu
With SQL Server 2005, new error handling has been introduced
with the TRY...CATCH processing. Basically what happens is
when an error occurs the processing in the TRY block stops
and processing is then picked up in the CATCH block.
ERROR_NUMBER() Returns the number of the error
ERROR_SEVERITY() Returns the severity
ERROR_STATE() Returns the error state number
ERROR_PROCEDURE() Returns the name of the stored procedure
or trigger where the error occurred
ERROR_LINE() Returns the line number inside the routine
that caused the error
ERROR_MESSAGE() Returns the complete text of the error
message. The text includes the values supplied for any
substitutable parameters, such as lengths, object names, or
times
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the difference between push and pull subscription? : sql server replication
What is subquery explain with example?
What is service broker? : sql server database administration
How to write character string constants or literals in ms sql server?
if no size is defined while creating the database, what size will the database have? : Sql server administration
how would you troubleshoot blocking? : Sql server database administration
Why would you call update statistics?
How many types of objects are there?
How to define the name and server for a new dsn?
Explain foreign key in sql server?
Write a program using SQL queries to find a unique entry in a table.
Why truncate is ddl?
What is set nocount on?
What are the 7 disadvantages to a manual system?
What are the requirements to use odbc connections in php scripts?