What should you recommend?

You need to recommend a solution for the error handling of USP_3. The solution must minimize the amount of custom code required.

What should you recommend?
A . Use the @@ERROR variable in the nested stored procedures.
B . Use a TRY CATCH block in the called stored procedures.
C . Use the @@ERROR variable in the called stored procedures.
D . Use the RAISERROR command in the nested stored procedures.

Answer: B

Explanation:

* Must catch and handle the error.

* Scenario: A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE statements called in sequence from within a transaction. Currently, if one of the UPDATE statements fails, the stored procedure continues to execute.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments