Connection Timeout While Trying to Connect to MySQL

Asked By 40 points N/A Posted on -
qa-featured

Occasionally, if my server is busy I get an error saying "connection timeout" while trying to connect to MySQL. When the error does occur it makes the program crash too. I would like to know how can I stop this happening and stop crashing, because it is so annoying. Here is the screenshot of the error:

 

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately. 

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

SHARE
Answered By 0 points N/A #139178

Connection Timeout While Trying to Connect to MySQL

qa-featured

Hello Maxwell,

In Stopping the error the solution is Try and Catch Control Flow

Actually I encounter this Error before and I was able to fix it

actual coding :

Try

'code here

Catch ex as Exception

msgbox ("Error: " & ex)

End Try

make sure your MySQL procedure is inside the Try and Catch Control Flow

then you will be able to handle the error without crashing the system hope it helps.

i did already tested it and it works fine.

Thank You

 

Related Questions