New Year Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

GIAC GIAC Secure Software Programmer - C#.NET GSSP-.NET Question # 52 Topic 6 Discussion

GIAC GIAC Secure Software Programmer - C#.NET GSSP-.NET Question # 52 Topic 6 Discussion

GSSP-.NET Exam Topic 6 Question 52 Discussion:
Question #: 52
Topic #: 6

Allen works as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2008 as its application development platform. Allen develops an application using .NET Framework 3.5. The application connects to a SQL Server database using a SqlConnection object named Connection1. He creates some stored procedures in the database, which are used to update the data. Allen finds that sometimes, the update operation does not affect any row. He wants to add an error handling code to the application. Which of the following code segments will he use to accomplish the task?


A.

try

{

Connection1.open();

}

catch(DataException Myexcept)

{

//Error-handling code

}


B.

try

{

Connection1.open();

}

catch(SqlException Myexcept)

{

//Error-handling code

}


C.

try

{

Connection1.open();

}

catch(DBConcurrencyException Myexcept)

{

//Error-handling code

}


D.

try

{

Connection1.open();

}

catch(InvalidCastException Myexcept)

{

//Error-handling code

}


Get Premium GSSP-.NET Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.