Bug #7731 | MySqlConnection.Connection = null generates a NullReferenceException | ||
---|---|---|---|
Submitted: | 7 Jan 2005 15:29 | Modified: | 12 Jan 2005 18:41 |
Reporter: | Calum Chisholm | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / NET | Severity: | S3 (Non-critical) |
Version: | 1.0.3.31712 | OS: | Windows (Windows XP Pro SP2) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[7 Jan 2005 15:29]
Calum Chisholm
[12 Jan 2005 18:38]
Reggie Burnett
Can you post a small snippet of code that clearly shows this problem?
[12 Jan 2005 18:41]
Reggie Burnett
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the original bug instead. Thank you for your interest in MySQL. Additional info: while you did not post this bug twice, this is the same problem as bug #7478. This has been fixed.
[12 Jan 2005 18:49]
Danilo Tuler
<snipet> MySqlCommand cmm = new MySqlCommand(); cmm.Connection = null; </snipet> I think the problem is in command.cs line 184. IMO the proper code is: if (value == null) { connection = null; return; } connection = (MySqlConnection) value; parameters.ParameterMarker = connection.ParameterMarker;