FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
WD How to interrupt a process . . .
WD How to interrupt a process . . .
Débuté par Jose Maldonado, 15 déc. 2017 01:39 - 4 réponses
Connectez-vous…
Jose Maldonado
#1
Posté le 15 décembre 2017 - 01:39
I updating a MS SQL database from a Query.
The process runs perfectly!
Occasionally while running the update procedure I need to stop it.
But I have not found the function or instructions to make that happen.
Can anyone give me a hint?
THNX !!
Joe Maldo
Signaler
0
0
Fabrice Harari
#2
Posté le 15 décembre 2017 - 11:49
Hi Joe
Not directly in wlanguage, no... However, this is a MSSQL problem, and therefore you are asking on the wrong forum...
As I was curious, I did a quick search and I found this:
https://forums.ni.com/t5/Example-Program-Drafts/Terminate-Stop-or-Kill-Long-Running-SQL-Server-Query/ta-p/3493642
can it be implemented easily in windev ? I would says probably yes, in a separate thread...
Best regards
Signaler
0
0
Jose Maldonado
#3
Posté le 15 décembre 2017 - 17:12
Thank you for your reply. However, this is a WinDev Query that is running and, from that query I am updating a MS SQL from WinDev.
So, I need a WinDev function that will do the trick . . .
This is the code that I am running from WinDev:
==============================================================
FOR EACH QRY_IMP_BOSS
// Displays the Stop Button while the data load is happening
BTN_StopProcess..Visible = True
HReadSeek(Values,Keys and Other Stuff)
IF HFound() THEN
CONTINUE
// The user preses a button on the screen to set this value to TRUE
// my problem is that the button is displayed but does not work during the update process . . .
IF bProcess_Stop = True THEN
BREAK
Info("Procedure Terminated by user . . . ")
BTN_StopProcess..Visible = False
END
ELSE
Destination.Fields = Source.Fields
HAdd(BVS_BOSS_LOAD)
END
nPBProcVal += 1
STC_Proc_Count = nPBProcVal
PROGBAR_Status = nPBProcVal
WinRedraw(WIN_Load_RAW_DATA)
END
Signaler
0
0
kingdr
#4
Posté le 15 décembre 2017 - 18:24
Hi
Try to add
multiTask(-1) after "FOR EACH QRY_IMP_BOSS"
to see if it works
HTH
King
Signaler
0
0
Fabrice Harari
#5
Posté le 15 décembre 2017 - 19:02
Hi again
it's NOT a windev query... It's a query run on a MSSQL DB by windev (ie windev is sending the query to MSSQL, MSSQL is doing the work, then giving the results back to windev)...
As such, the ONLY way to interrupt the process while it is running on the MSSQL server is to ASK MSSQL to stop it, and that is what is described in the URL I gave you.
as for the answer by King, it won't do anything, as the query is run ON THE SERVER, in its entirety, before the first iteration in the for loop.
Best regards
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte