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
Explain the use of keyword with encryption. Create a store procedure with encryption?
Can you explain different types of joins?
Explain what are the events recorded in a transaction log?
What are the steps to process a single select statement?
Define primary key?
What is @@error in sql?
What do you mean by cardinality?
What is single-user mode?
What is meant by referential integrity?
What are distinctive joins find as a part of sql?
How can I track the changes or identify the latest insert-update-delete from a table?
Can you please explain the difference between function and stored procedure?
Why normalization is used?
How can you set the threshold at which sql server will generate keysets asynchronously?
Can we hide the definition of a stored procedure from a use?