MySQLConnection StateChange
Posted by: Matthijs Zwart
Date: January 25, 2016 11:14AM


I'm using MySql.Data.dll to connect to a DB in C#, something like this:

(private fields)
MySqlConnection _conn;
static string _connStr;

(in a method)
_connStr = "bladibla"; //correct string of course
_conn = new MySqlConnection(_connStr);
_conn.StateChange += CheckConnection;

When the connection is "Connecting" or "Open", the StateChange event is triggered.

But when I stop the MySQL server, I don't get any event for the state change. While the connection must be either broker or closed.

Is this a known issue? Or should I take care of this in another way? Google wasn't helpful with this specific issue.
kind regards,


Options: ReplyQuote

Written By
MySQLConnection StateChange
January 25, 2016 11:14AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.