CoreLab.MySql.MySqlException

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Johan

CoreLab.MySql.MySqlException

Post by 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/Vi ... odeID=3423

Thanks
/Johan

Oleg
Devart Team
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Re: CoreLab.MySql.MySqlException

Post by Oleg » Wed 03 Nov 2004 10:56

Add Try-Finally construction to your code and close connection in Finally clause.

Guest

Post by Guest » Fri 05 Nov 2004 15:19

Many thanks...
Seems to help :)

Johan

Post by 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/Vi ... odeID=3456

Johan

Post by 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/Vi ... odeID=3460

Many thanks if you can help me.

Oleg
Devart Team
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Post by 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.

Post Reply