简体   繁体   English

长时间异步Postack期间从进度表查询

[英]Querying from a Progress Table During a Lengthy Asynchronous Postack

I'm migrating an interface to a database from InfoPath to a .NET Web App in Visual Studio. 我正在将界面的数据库从InfoPath迁移到Visual Studio中的.NET Web App。 The SQL Server database is set up that the user executes a single procedure, which kicks off other procedures, which kick off more procedures, etc. For the entire database to complete its procedures (a "model run"), it takes about 30 minutes. 设置SQL Server数据库为用户执行一个过程,该过程将启动其他过程,再启动更多过程,等等。整个数据库要完成其过程(“模型运行”),大约需要30分钟。

At the end of each of these single procedures, a record is inserted into a table called sysProgressAudit. 在每个单个过程的末尾,都会将一条记录插入到名为sysProgressAudit的表中。 I want to bind this table to a gridview in an update panel, so that it can constantly refresh and the user can monitor the progress of the model run. 我想将此表绑定到更新面板中的gridview,以便它可以不断刷新,并且用户可以监视模型运行的进度。 However, since the databind is also a post-back, I'm afraid that I won't be able to synchronously refresh the gridview while the model is running (since the original stored procedure won't have returned fully). 但是,由于databind也是回发的,因此恐怕我无法在模型运行时同步刷新gridview(因为原始存储过程不会完全返回)。

Is it possible to refresh an update panel constantly within any PageRequestManager events? 是否可以在任何PageRequestManager事件中不断刷新更新面板? What do you think is the optimal solution to having a long-running query and needed to refresh a table at the same time? 您认为对于具有长时间运行的查询并且需要同时刷新表的最佳解决方案是什么?

I suppose I could kick off the query and not have it return anything (the original InfoPath method), but I'll lose a lot of error-handling and exception-catching functionality... 我想我可以开始查询并且不让它返回任何内容(原始InfoPath方法),但是我将丢失很多错误处理和异常捕获功能...

You should look into SignalR for getting the status. 您应该调查SignalR以获取状态。 Or your can just have an ajax call on a timer gets the status information and then update the grid. 或者,您可以只在计时器上进行ajax调用以获取状态信息,然后更新网格。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM