Querying from a Progress Table During a Lengthy Asynchronous Postack

96 Views Asked by At

I'm migrating an interface to a database from InfoPath to a .NET Web App in Visual Studio. 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.

At the end of each of these single procedures, a record is inserted into a table called 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. 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).

Is it possible to refresh an update panel constantly within any PageRequestManager events? 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...

1

There are 1 best solutions below

0
On

You should look into SignalR for getting the status. Or your can just have an ajax call on a timer gets the status information and then update the grid.