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
When I run the sql server 2000 setup, it just hangs. What do I do?
What is store procedure? How do they work? When do you use?
How to delete all rows with truncate table statement in ms sql server?
Does any body please help me what question's have asked for SSRS in the interview?
explain different types of cursors? : Sql server database administration
What are the essential components of sql server service broker?
Can I run multiple instances of sql server 2000 at the same time on one computer?
How to disable stored procedure sql server?
How to link tables in sql server?
What is the maximum row of a size?
How to get a list of all tables with "sys.tables" view in ms sql server?
What is indexed view? How to create it?
Write a sql query to delete duplicate records from a table called table1
Explain full-text indexing?
What is compression - row-level and page-level compression?