Execute a stored procedure from a windows form asynchronously and then disconnect?

前端 未结 8 1316
青春惊慌失措
青春惊慌失措 2020-12-08 10:48

I am calling a stored procedure from my application that can take 30 minutes to execute.

I don\'t want to make my user leave the application open for that entire tim

8条回答
  •  孤城傲影
    2020-12-08 11:34

    let them shut down the app and come back later

    If you're going to allow them to completely close the app, you'll have to start up a seperate .exe or something in a different ThreadPool that executes your code calling the stored procedure. Otherwise your thread will die when you close the app.

提交回复
热议问题