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 ?
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,What is your implementation please?
Hi Vilian
You can check if the "my.cnf" file has this line:
wait_timeout=28800
Best regards
Carlos
csincuir wrote:Hi VilianTimeOut is not at all a problem for FWHmaria library
You can check if the "my.cnf" file has this line:
wait_timeout=28800
Best regards
Carlos
nageswaragunupudi wrote:What is your implementation please?I just try after the command if nError <> 0, and in this case, I repeat the the command. Something like this:
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 -1Is it possible ?
This can work if you use only a table.
However, if you had previously opened other tables, do you find them closed?
It is a problem that even when the internet connection is not stable
Maurzio
Maurizio,
I understood what you are saying, but in this case, I'm always checking for errors, so i really dont need this message. This is just disturbing my customer and me too.
Mr. Vilian
You do not need to write any code to check the errors.
FWH Library already does it for you.
You do not need to repeat in your code, what FWH library has already done it.
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.
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.If not our "lost connection" message, you are giving your own custom message. Right?
Please, provide something to avoid it.
No my friend. I dont want my own custom message. I just wanted recover the conexion with the mysql server and continue running without show any message.
Some viruses or trojans can cut down connection.
Your connecting line may with serious problem, our customers use tmysql 20 years with no the problem in normal via bandwidth >0.2M bits .
Sorry Shuming ,
your comment does not help to solve the problem ,
but above all it is your situation that is not the same for everyone
Maurizio
Good Afternoon Mr Rao,
IF I try to do this:
oRs := oBD:Query("SELECT * FROM customers")
oRs:SetOrder("name")
And the mysql connection has been lost, there will be an error in oRs:SetOrder("name"), like this:
ERROR BASE/1004 Message not found NIL:SetOrder
What should I to do for avoid this error and allow my program continue running?