Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9039839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:49:48+00:00 2026-06-16T09:49:48+00:00

I have a single Pre-Processing Stored procedure which calls multiple stored procedures inside. Finally

  • 0

I have a single “Pre-Processing” Stored procedure which calls multiple stored procedures inside.

Finally when all my SPS (inside) have successfully executed, I want to run an update statment, so in the main SP I have :

EXEC SP1
EXEC SP2
EXEC SP3

-- RUN UPDATE statment here

All of my inner SPs have the following template :

  BEGIN TRY
  BEGIN TRANSACTION

  // DO SOME INSERT,UPDATE ETC..

  COMMIT TRANSACTION;
  END TRY
  BEGIN CATCH
         SELECT 
            ERROR_NUMBER() AS ErrorNumber
            ,ERROR_SEVERITY() AS ErrorSeverity
            ,ERROR_STATE() AS ErrorState
            ,ERROR_PROCEDURE() AS ErrorProcedure
            ,ERROR_LINE() AS ErrorLine
            ,ERROR_MESSAGE() AS ErrorMessage;

  IF @@TRANCOUNT > 0
        ROLLBACK TRANSACTION;
         RETURN
  END CATCH

My question is as to what is the best approach for error handling in this scenario, i.e. I want to make sure everything got done before I run that final update statement.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T09:49:49+00:00Added an answer on June 16, 2026 at 9:49 am

    Closing this since I figured out that each SP had to have its own Error handling and the outside SP calling multiple SPs would not need to have error handling.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a single filed which i need to clone with a clone button
I have a single big text file in which I want to process each
I have a pre-existing c++ object model which represents the business layer tier of
I have been using Ember's Router (v1.0.pre) with single dynamic segments and really happy
I have an ASP.NET 4.0 web application which needs to be pre-compiled into a
I need a sorting algorithm which operates on a single, pre-populated array, and which
I have A single page that has the following structure <form runat=server><placeholder></placeholder></form> I have
i have a single video (duration: 3 seconds) and i need to create 2
I have a single-view application that takes in a username and a password and
I have a single page website that changes content based on variables passed through

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.