GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV 2024
→
WD How to interrupt a process . . .
WD How to interrupt a process . . .
Iniciado por Jose Maldonado, dez., 15 2017 1:39 AM - 4 respostas
Conecte-se…
Jose Maldonado
#1
Publicado em dezembro, 15 2017 - 1:39 AM
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
Denunciar
0
0
Fabrice Harari
#2
Publicado em dezembro, 15 2017 - 11:49 AM
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
Denunciar
0
0
Jose Maldonado
#3
Publicado em dezembro, 15 2017 - 5:12 PM
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
Denunciar
0
0
kingdr
#4
Publicado em dezembro, 15 2017 - 6:24 PM
Hi
Try to add
multiTask(-1) after "FOR EACH QRY_IMP_BOSS"
to see if it works
HTH
King
Denunciar
0
0
Fabrice Harari
#5
Publicado em dezembro, 15 2017 - 7:02 PM
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
Denunciar
0
0
→ Voltar para WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto