I have switched my C# project from MySQL ADO.NET libraries to MySQL connector since there was a bug in MySQL libraries.
Previous Question related to the aforementioned issue: StackOverFlow Question
I have used MySql Connector documentation as the reference for switching libraries.
Following the change of the libraries, there were some new errors triggered for the MySQL keywords in the existing project.
1) MySqlConnection
in private MySqlConnection connection;
line.
Error: Represents an open connection to a MySQL Server database. This class cannot be inherited. The type 'MySqlConnection' exists in both 'MySql.Data' and 'MySqlConnector'.
2) MySqlException
in catch (MySqlException ex)
line.
Error: The Exception is thrown when MySQL returns an error. This class cannot be inherited. The type 'MySqlException' exists in both 'MySql.Data' and 'MySqlConnector'.
3) MySqlCommand
in MySqlCommand cmd = new MySqlCommand();
line.
Error: Represents a SQL Statement to execute against a MySQL database. This class cannot be inherited. The type 'MySqlCommand' exists in both 'MySql.Data' and 'MySqlConnector'.
4) MySqlDbType
in cmd.Parameters.Add("?jobNo", MySqlDbType.VarChar).Value = (values[0]);
line.
Error: Specifies MySQL specific data type of a field, property, for use in a MySql.Data.MySqlClient.MySqlParameter. The type 'MySqlDbType' exists in both 'MySql.Data' and 'MySqlConnector'.
Any suggestions on how to mitigate the above errors?