ChuckBell / MySQL_Connector_Arduino

Database connector library for using MySQL with your Arduino projects.
333 stars 133 forks source link

ERROR: Class requires connected server. #164

Closed hervema closed 3 years ago

hervema commented 3 years ago

Hello,

I get, sometimes, this error without understand why. This occurs sometimes, after a query. Seems no real rule in fact, hard to debug.

Do you have some clue to help me to understand and correct the problem ?

Thanks in advance,

Regards,

Hervé

hervema commented 3 years ago

And of course, the connection (and wifi) were success before anything :-)

ChuckBell commented 3 years ago

It simply means the connection to the server was closed. Try opening and closing the connection in the loop() function per the wiki suggestions.

ChuckBell commented 3 years ago

It simply means the connection to the server was closed. Try opening and closing the connection in the loop() function per the wiki suggestions.

ChuckBell commented 3 years ago

It simply means the connection to the server was closed. Try opening and closing the connection in the loop() function per the wiki suggestions.

hervema commented 3 years ago

Thank you for your response. Indeed, the message seems to indicate the source of the problem. However, the connection is correct and established. I suspect that the problem occurs while reading the results of a query. However, this will be very hard to prove. The problem is very random. My code works 95% of the time. So I won't spend much time diagnosing further. Thank you very much.