Hi Guys,
Sometimes, my customer is getting an error with the message "Lost connection to MySQL server during query". Nowaday, i already have an implementation to surround this problem, so i would like this message was not showed. Is it possible ?
Nowaday, i already have an implementation to surround this problem,
csincuir wrote:Hi Vilian
You can check if the "my.cnf" file has this line:
wait_timeout=28800
Best regards
Carlos
nageswaragunupudi wrote:What is your implementation please?
oQry := oBD:Query("SELECT * FROM ttartes LIMIT 1")
IF (nRet := ::CheckBD()) < 0
RETURN lRet
ELSEIF nRet = 1
oQry := oBD:Query("SELECT * FROM ttartes LIMIT 1")
ENDIF
METHOD CheckBD() CLASS TTarTes
IF oEmpresa:oBD:nError == 0
RETURN 0
ELSEIF oEmpresa:oBD:Connect()
RETURN 1
ELSE
MsgInfo("Ocorreu uma falha na conexão com o BD com a seguinte mensagem:"+CRLF+oEmpresa:oBD:cError,"Atenção")
ENDIF
RETURN -1
vilian wrote:Sorry, but if i don't do this, every time i had a "Lost Connection", i will have an error message. So, with this code i can avoid the error message, but i can't avoid "Lost connection" message.
Please, provide something to avoid it.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 87 guests