Page 1 of 1
CoreLab.MySql.MySqlException
Posted: Wed 03 Nov 2004 08:59
by Johan
Exception Details: CoreLab.MySql.MySqlException: Lost connection to MySQL server during query
I occassionally gets this error message - and I cannot figure out why.
Maybe you can give me some tips what to change?
Here's the code
http://authors.aspalliance.com/aylar/Vi ... odeID=3423
Thanks
/Johan
Re: CoreLab.MySql.MySqlException
Posted: Wed 03 Nov 2004 10:56
by Oleg
Add Try-Finally construction to your code and close connection in Finally clause.
Posted: Fri 05 Nov 2004 15:19
by Guest
Many thanks...
Seems to help

Posted: Tue 09 Nov 2004 20:59
by Johan
It's me again - and I'm sad to say that it did not help actually
I've localized the error to the line
"Dim objrdr As MySqlDataReader = objCom.ExecuteReader()"
The error doesn't occur all the time i access the page - but almost always if i go from that page to another and then wait 10 seconds and clicks on a link back to this page.
The code for the Sub in which the error occurs:
http://authors.aspalliance.com/aylar/Vi ... odeID=3456
Posted: Tue 09 Nov 2004 23:01
by Johan
Been looking at it more now.
I have the same problem on all my pages when using ExecuteReader()
Been changing the code aswell - using databind()
http://authors.aspalliance.com/aylar/Vi ... odeID=3460
Many thanks if you can help me.
Posted: Wed 17 Nov 2004 13:46
by Oleg
Check the value set at `wait_timeout' variable on your MySQL server.
And please test the problem with MySQLDirect .NET version 2.70.