Bug #8724 NullReferenceException in Designer
Submitted: 23 Feb 2005 12:01 Modified: 30 Aug 2005 6:24
Reporter: Markus Abele
Status: Closed
Category:Connector/Net Severity:S2 (Serious)
Version:1.0.4 OS:Microsoft Windows (Windows XP SP2 German)
Assigned to: Reggie Burnett Target Version:

[23 Feb 2005 12: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 16: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 6:24] Mike Hillyer
Added reference to this bug to the Bug #12551 changelog entry.