Edit this page

MySql connector v.6.10.4 throws a NullReferenceException

Environment

Product ProgressĀ® TelerikĀ® Reporting
Project Type .NET

Description

When connecting to a MySQL database using MySQL Connector Net 6.10.4, a NullReferenceException is thrown. The reason is that the MySqlClientFactory class, which is created at runtime by DbProviderFactories.GetFactory() does not implement the CreateCommandBuilder() method. This method is used internally to derive the DbCommand parameters and it must be implemented in the CommandBuilder instance.

Solution

Although MySQL Connector Net 6.10.4 does not implement the method, it is implemented in a previous version of the connector (6.4.6). This version can be used to connect to MySql databases until the method is implemented in a future release of MySQL connector. Another option is to use the ODBC connector from MySQL website.

See Also

MySQL Connectors

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy