You create an application by using the Microsoft .NET Framework 3.5 and Microsoft
ADO.NET. The application connects to a Microsoft SQL Server 2005 database.The
application uses a SqlConnection object that is active for the lifetime of a user session.You
need to ensure that the application gracefully handles all the exceptions that cannot be
recovered.Which task should your code perform?
A.
Catch all the SqlException exceptions and examine the State property of each error. If the
State property value is 0, gracefully exit the application.
B.
Catch all the SqlException exceptions and examine the State property of each error. If the
State property value is not 0, gracefully exit the application.
C.
Catch all the SqlException exceptions and examine the Class property of each error. If the
Class property value is greater than 16, gracefully exit the application.
D.
Catch all the SqlException exceptions and examine the Source property of each error. If
the Source property value is not .Net SqlClient Data Provider, gracefully exit the applicat ion.
Explanation:
Class gets the severity level of the error returned from SQL Server