Bug #8724 NullReferenceException in Designer
Submitted: 23 Feb 2005 11:01 Modified: 30 Aug 2005 4:24
Reporter: Markus Abele Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:1.0.4 OS:Windows (Windows XP SP2 German)
Assigned to: Reggie Burnett CPU Architecture:Any

[23 Feb 2005 11:01] Markus Abele
Description:
In the ConnectionString Property, a Error Message with a NullReferenceException is displayed. After compiling the source and running with debug symbols, I got the error message below:

System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   at MySql.Data.MySqlClient.MySqlConnectionString.CreateConnectionString() in C:\Programme\MySQL\MySQL Connector Net 1.0.4\src\MySqlClient\ConnectionString.cs:line 300
   at MySql.Data.MySqlClient.MySqlConnectionString.GetConnectionString() in C:\Programme\MySQL\MySQL Connector Net 1.0.4\src\MySqlClient\ConnectionString.cs:line 261
   at MySql.Data.MySqlClient.MySqlConnection.get_ConnectionString() in C:\Programme\MySQL\MySQL Connector Net 1.0.4\src\MySqlClient\Connection.cs:line 172

How to repeat:
Adding a MySQL Connection in the Designer

Suggested fix:
ConnectionString.cs, Line 317 and 318:

defaults["database"] = String.Empty;
defaults["charset"] = String.Empty;

The nulls in the default settings are causing this Exception.
[24 Aug 2005 14:52] Reggie Burnett
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

This is the same issue as bug #12551 and is fixed in 1.0.5
[30 Aug 2005 4:24] Mike Hillyer
Added reference to this bug to the Bug #12551 changelog entry.