PrepAway - Latest Free Exam Questions & Answers

Which task should your code perform?

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?

PrepAway - Latest Free Exam Questions & Answers

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 application.

4 Comments on “Which task should your code perform?


Leave a Reply