In the sub-stored procedure, a custom error is displayed in the form of raiserror (msg,). An error is displayed in the parent stored procedure, however, the parent transaction is not rolled back during execution. What other configurations do I need? If an error occurs in sub-Stored Procedure 1, an error is output, but the primary stored procedure is not rolled back. 1begintran23
In the sub-stored procedure, a custom error is displayed in the form of raiserror ('msg ',). An error is displayed in the parent stored procedure, however, the parent transaction is not rolled back during execution. What other configurations do I need? If an error occurs in sub-Stored Procedure 1, an error is output, but the primary stored procedure is not rolled back. 1 begin tran 2 3
In the sub-storage process, a custom error is displayed in the form of raiserror ('msg,
An error is displayed in the parent stored procedure, but the parent-level data is not rolled back during execution.TransactionsIs any other configuration required?
If an error occurs in sub-Stored Procedure 1, an error is output, but the primary stored procedure is not rolled back.
1 begin tran 2 3 exec sub-Stored Procedure 1 4 exec sub-Stored Procedure 2 5 exec sub-stored procedure 3 6 exec sub-Stored Procedure 4 7 8 if @ error <> 0 9 rollback tran10 else11 commit tran