What should you recommend?

A Windows Azure application stores data in a SQL Azure database. The application will start an operation that includes three insert statements. You need to recommend an approach for rolling back the entire operation if the connection to SQL Azure is lost.What should you recommend?

Question:

What should you recommend?

Options:

Ensure that all statements execute in the same database transaction.

Create a stored procedure in the database that wraps the insert statements in a TRY CATCH block

Create a stored procedure in the database that wraps the insert statements in a TRANSACTION block.

Open a new connection to the database. Use a separate transaction scope to roll back the original operation.

Correct Answer

The Correct Answer for this Question is

Ensure that all statements execute in the same database transaction.

Leave a Comment