CoreLab.MySql.MySqlException

CoreLab.MySql.MySqlException

Postby Johan » Wed 03 Nov 2004 08:59

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/ViewPasteCode.aspx?PasteCodeID=3423

Thanks
/Johan
Johan
 

Re: CoreLab.MySql.MySqlException

Postby Oleg » Wed 03 Nov 2004 10:56

Add Try-Finally construction to your code and close connection in Finally clause.
Oleg
Devart Team
 
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Postby Guest » Fri 05 Nov 2004 15:19

Many thanks...
Seems to help :)
Guest
 

Postby Johan » Tue 09 Nov 2004 20:59

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/ViewPasteCode.aspx?PasteCodeID=3456
Johan
 

Postby Johan » Tue 09 Nov 2004 23:01

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/ViewPasteCode.aspx?PasteCodeID=3460

Many thanks if you can help me.
Johan
 

Postby Oleg » Wed 17 Nov 2004 13:46

Check the value set at `wait_timeout' variable on your MySQL server.
And please test the problem with MySQLDirect .NET version 2.70.
Oleg
Devart Team
 
Posts: 264
Joined: Thu 28 Oct 2004 13:56


Return to dotConnect for MySQL