Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
3
Erster Beitrag:
vor 1 Jahr, 1 Monat
Letzter Beitrag:
vor 1 Jahr, 1 Monat
Beteiligte Autoren:
Danny Lauwers, Fabrice Harari

[WB21] Long running MS SQL Query in background ?

Startbeitrag von Danny Lauwers am 07.07.2016 12:57

Hi,

What would be the best strategy to run an long calculation that is done in a MS SQL stored Procedure triggered by a user action from a webpage ?

The user presses the"Calculate" button on the webpage. This will call a procedure on the WebDev Server Side that is calling the MS SQL Stored Procedure that does the calculation. This calculation takes about 1 to 2 minutes depending on the parameters.

I show a wait dialog on the screen, but my Browser (Chrome) will display an warning box that the server is not responding. You can select cancel or wait. But if it takes to long it will just abort the whole thing ! Even the warning box is not wanted.

Can I start a thread on server side to run this procedure in the background ?
En when it is finished, how can I notify the user ? I would like to show a "Calculating NOW" message in the browser that would disappear when the calculation is done, even if this calculation or process would take a few minutes and would exceed the browser response timeout !

How to best approach this kind of problem ?

Thanks
Danny

Antworten:

Hi Danny,

you could use a call made with ajaxexecuteasynchronous from browser code...

This call doesn't wait for a return, so you would't have your warning message, and it will call a local/blorwser procedure when finished

Best regards

von Fabrice Harari - am 07.07.2016 14:20
Thanks Fabrice,

I'll try that direction and post the results here !

Danny

von Danny Lauwers - am 07.07.2016 23:25
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.