PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WM20 (android )] ThreadExecute() and DB webservice not stable
[WM20 (android )] ThreadExecute() and DB webservice not stable
Iniciado por guest, 03,ago. 2015 07:14 - No hay respuesta
Publicado el 03,agosto 2015 - 07:14
I doing a test to run a procedure in the thread.
in main thread

Info("start")
M_cnt is int = 1
M_scnt is string
LOOP (20)
M_scnt = "cnt0" + NumToString(M_cnt)
ThreadExecute(M_scnt, threadNormal, test)
M_cnt++
Multitask(100)

END

Info("done")

-------------------------------------------------------------------------------------
PROCEDURE test()

m_sql is string = [
SELECT count(People_Name) FROM People
ORDER BY People_Name
LIMIT 4000;

]

M_QRY is Data Source

WHEN EXCEPTION IN

IF SQLConnectWS(G_DB_WebService, G_DB_Server,G_DB_UID, G_DB_PWD, G_DB_Name, G_DB_Type) = 0 THEN ExceptionThrow(1,"Error SQLConnectWS (" + G_DB_WebService + ")" )

IF SQLExec(m_sql, M_QRY) = False THEN
SQLInfo()
Info("Error SQLExec " , SQL.MesError)
ELSE

END

DO
SQLInfo()
Error( "Exception Occured : " + CR+ ExceptionInfo(), "Error code : " + SQL.Error , "Error Message : " + CR + SQL.MesError)
END


IF SQLReqExists(M_QRY) = True THEN SQLClose(M_QRY)
SQLDisconnect()


---------------------------------------------------------------------------------------------------------
here the log from webservice

_ 20150803043323 AWWS wdsoapdb *ERROR* ERR_MSG_BOX 0 192.168.43.211 wdsoapdb
Que s'est-il passé ?
The query parameter was not found.

Code erreur : 40089
Niveau : erreur non fatale (EL_ONRETURN)

Dump de l'erreur du module 'wd200xml64.dll' (20.0.31.0).
0
_ 20150803043323 AWWS wdsoapdb *ERROR* ERR_MSG_BOX 0 192.168.43.211 wdsoapdb
Que s'est-il passé ?
The query parameter was not found.

Code erreur : 40089
Niveau : erreur non fatale (EL_ONRETURN)

Dump de l'erreur du module 'wd200xml64.dll' (20.0.31.0).
0


----------------------------------------------------------------------------------------------------------
Summary

after the test i discover , if without Multitask(100) after ThreadExecute() . this will generate fatal.

but even with Multitask(100) , this is not bullet proof solution . when i run 10 times of the main thread, i get once fatal error . I try by set Multitask(200) . after that I don't get the error.

how long multitask need to set ? my guess is depend your query .