Login
Register
All Activity
Questions
Unanswered
Tags
Users
Ask a Question
About Us
986
Questions
785
Answers
Interview Preparation mode
beta
Funny Facebook Status
Enter your email address
All categories
SQL Server Interview Questions and Answers
(197)
SSIS Interview Questions and Answers
(54)
SSRS Interview Questions and Answers
(9)
SSAS Interview Questions and Answers
(29)
.NET Interview Questions and Answers
(186)
Oracle Interview Questions and Answers
(122)
Java Interview Questions and Answers
(32)
UNIX Interview Questions and Answers
(47)
Networking Interview Questions and Answers
(17)
MySQL Interview Questions and Answers
(30)
HR Interview Questions and Answers
(237)
General Interview Questions and Answers
(9)
Other Interview Questions and Answers
(8)
Job Openings
(3)
Greenplum Database Interview Questions and Answers
(5)
What is the new error handling technique in SQL Server 2005?
Nice?
Vote!
asked
1 year
ago
in
SQL Server Interview Questions and Answers
by
Anand
(
1,440
points)
sql-server-interview-question
error-handling
2 Answers
Nice?
Vote!
Previously, error handling was done using @@ERROR or check @@ROWCOUNT, which didn’t turn out to be a very feasible option for fatal errors. New error handling technique in SQL Server 2005 provides a TRY and CATCH block mechanism. When an error occurs the processing in the TRY block stops and processing is then picked up in the CATCH block. TRY CATCH constructs traps errors that have a severity of 11 through 19 as well.
answered
1 year
ago
by
Anand
(
1,440
points)
Nice?
Vote!
SQL Server 2005 introduces a new exception handling paradigm using TRY / CATCH blocks in T-SQL. The errors are well trapped in the try block and the execution is transferred to the catch block. The circumstances like using cursors… the cursor is allocated for opening in the TRY block at the time of occurring an error is thrown to CATCH block to determine whether it is open. If it is open, it should be close and deallocate.
SQL Server 2005 still supports the @@ERROR function, but TRY / CATCH is a much better option.
answered
1 year
ago
by
Anand
(
1,440
points)
Related questions
Nice?
Vote!
1
answer
What is Syntax for creating a new assembly in SQL Server 2005?
asked
1 year
ago
in
SQL Server Interview Questions and Answers
by
Boni
(
860
points)
sql-server-interview-question
net-interview-question
assembly
Nice?
Vote!
Add
Ans!
What is Syntax for creating a new assembly in SQL Server 2005?
asked
1 year
ago
in
SQL Server Interview Questions and Answers
by
Boni
(
860
points)
sql-server-interview-question
net-interview-question
Nice?
Vote!
Add
Ans!
What is the difference between SQL SERVER 2000 and 2005?
asked
1 year
ago
in
SQL Server Interview Questions and Answers
by
Pandi
(
540
points)
sql-server-interview-question
database
Nice?
Vote!
1
answer
What is a "SAND BOX" in SQL Server 2005?
asked
1 year
ago
in
SQL Server Interview Questions and Answers
by
Boni
(
860
points)
sql-server-interview-question
net-interview-question
Nice?
Vote!
2
answers
What is the importance of primary keys and foreign keys in a SQL Server OLTP database design?
asked
1 year
ago
in
SQL Server Interview Questions and Answers
by
R
(
19,530
points)
sql-server-interview-question
junior-sql-server-developer-interview-questions
data-modeling