1.

Point out the wrong statement.(a) If an error occurs in the TRY block, control is not passed to another group of statements that is enclosed in a CATCH block(b) If an error occurs in the TRY block, control is passed to another group of statements that is enclosed in a CATCH block(c) If an error does not occur in the TRY block, control is passed to another group of statements that is enclosed in a CATCH block(d) None of the mentionedThis question was posed to me in unit test.I want to ask this question from Error Handling topic in chapter Developing with SQL Server of SQL Server

Answer»

The correct OPTION is (b) If an error occurs in the TRY block, control is passed to ANOTHER group of STATEMENTS that is enclosed in a CATCH block

Easiest explanation: A TRY…CATCH construct CATCHES all EXECUTION errors that have a severity higher than 10 that do not close the database connection.



Discussion

No Comment Found

Related InterviewSolutions