Bug #9699 Connection State Issues
Submitted: 7 Apr 2005 1:14 Modified: 22 Sep 2005 15:28
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
Category:Connector / NET Severity:S2 (Serious)
Version:MySQL Connector Net 1.0.4 OS:Windows (XP)
Assigned to: Reggie Burnett CPU Architecture:Any

[7 Apr 2005 1:14] [ name withheld ]

I created a linked list of connections (10 connections to be exact) and then I wrote a function to search for an open exception. 

The code just checks conn.State == ConnectionState.Open .... and it won't even enter the function in the debugger - but instead throws up this error. 

Any ideas would be great...thanks!
- G

"An unhandled exception of type 'System.MissingMethodException' occurred in test.exe
Additional information: Method not found: System.Data.ConnectionState MySql.Data.MySqlClient.MySqlConnection.get_State()."

I then tried putting a state change handler in there - and go this beauty:

""An unhandled exception of type 'System.MissingMethodException' occurred in test.exe
Additional information: Method not found: Void MySql.Data.MySqlClient.MySqlConnection.add_StateChange(System.Data.StateChangeEventHandler)."

How to repeat:
Here is the code snippet: 

MySqlConnection conn = null;
conn = (MySqlConnection) iConnections.PeekIndex(counter);

// check the state
if (conn.State == ConnectionState.Open)
     return conn;
[17 May 2005 9:01] Vasily Kishkin
Tested on Win 2000 Sp4, Microsoft Visual C# .NET , Connector .NET 1.0.4
[20 Jun 2005 18:54] Reggie Burnett
I have been unable to reproduce this.  Were you using the proper .NET runtime with the appropriate assembly?  These are the types of errors I see when someone uses a 1.1 compiled assembly in a 1.0 compiled app, for example.

Can you attach to this bug report a sample app that shows the problem?
[22 Sep 2005 15:28] Reggie Burnett
I was unable to reproduce this.  Normally when you get issues like method not found, invalid pinvokes, invalid metadata it's because you are mixing runtimes.  Compiling a .NET 1.0 app  using a .NET 1.1 assembly or vice versa.  I believe that is the case here.  If there is new information on this, then I'll revisit it.