存储过程和程序仍在运行,即使关闭浏览器? [英] Stored proc and program are still running even though browser is closed?

查看:151
本文介绍了存储过程和程序仍在运行,即使关闭浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.NET网页,将调用SQL Server中的存储过程WHN上的按钮,用户点击进行计算。通常情况下,计算时approxiamately 2分钟才能完成,完成后会在更新表中的字段。现在我有一个问题,当用户不小心关闭浏览器,存储的过程仍然会运行和更新表。我认为网页应该停止运行,停止更新在表中的字段,而不是继续即使浏览器被关闭运行?任何想法如何停止进程??

i have a .NET page that will perform calculation by calling a stored proc in SQL Server whn user click on a button. Normally, the calculation takes approxiamately 2 mins to complete and upon completion it will update a field in the table. Now i have a issue that, when user accidentally close the browser, the stored proc will still be running and update the table. I thought that the page should stop running, stop updating the field in table instead of keep on running even though the browser was closed?? Any ideas how to stop the process??

推荐答案

当到数据库调用的页面请求的结果,页面将等待它完成,但数据库没有页面knowlegde。因此,如果该页面将停止等待什么原因,该数据库将很乐意继续工作,直到完成。实际上,页面请求还没有关于浏览器是否仍然是开放的或不knowlegde,因此,如果用户关闭浏览器,页面请求本身仍然会执行直到完成。这只是没有人会听的结果。

When a page request results in a call to the database, the page will wait for it to finish, but the database has no knowlegde of the page. So if the page stops waiting for whatever reason, the database will happily continue working until finished. In fact, the page request also has no knowlegde about whether the browser is still open or not, so if the user closes the browser, the page request itself will still execute until finished. It's only that nobody will listen to the result.

这篇关于存储过程和程序仍在运行,即使关闭浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆