Is there a way for a sproc to give control back to calling application while finishing executing?

  • I've got a long running sproc. Would like to return a 0 to the calling application right off the bat, but I need the rest of the sproc to continue running.

    ??

    Am I not thinking of something obvious?

    Thanks!

  • You need to look at changing how you make your call to the stored procedure. What you're describing sounds like something akin to messaging: you just request that the stored proc be run, and then you will check at some point in the future to see if that particular execution has finished.

    Depending on what you're developing your application with, you could either use SQL's Service Broker functionality, or perhaps look at using WCF or MSMQ on the windows/.NET side.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Thanks for the direction Matt!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply