I recently installed the MySql.Data.Entity package so that my Entity Framework code would work with a MySQL database instead of a previous SQL database. I also changed all references of ‘SqlConnection’, ‘SqlCommand’, and ‘SqlParameter’ to ‘MySqlConnection’,
‘MySqlCommand’, and ‘MySqlParameter’. This code was necessary because there was no Entity Framework code that would work with the reader and the removal of table rows. But, errors were generated wherever these references are used, which state that these
types exist. What does this mean and what must I do to rectify these errors? The following is an example of how these references are used in my C# website code to remove a row from a table:

Thank you for responding with links to useful information about how to connect to MySQL using C#. I examined both links very closely, but I fail to find where the problem is. The first document provides 6 steps. Step 1 says to open a web page in Visual
Studio and create a MySql database for it to access. I opened a page in an existing project and used MySQL Workbench to create a database. Step 2 refers to the creation of a table within the database, which I also did with MySQL Workbench. Step 3 says to
add new references into the project of files MySql.dll andMySql.web.dll, which was done.
Step 4 states to add the namespace “using MySql.Data.MySqlClient;” to the project, which was also done. Step 5 refers to creating a MySQL connection string, which was added immediately after the public partial class declaration for the web page. The
following connection string refers to the local database in my computer.

Unfortunately, every time that MySqlConnection is used in my code, it generates an error Code: CS0433 with a description: The type 'MySqlConnection' exists in both 'MySql.Data, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' and 'MySql.Data,
Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'

PLEASE REMEMBER that all of this code was working properly without error UNTIL I installed the MySql.Data.Entity package in order to enable my Entity Framework code to ALSO work with the new MySql database. Actually, the link provided to help me failed
to mention the step to have Server Explorer connect to the MySql database, which tested successfully. Now, it appears that there is a problem with having both ways to interact with the database. I need both ways to work since Entity Framework does not include
any way to remove unwanted rows from tables. Please help.

I fixed this problem by simply removing the duplicate ‘MySql.Data’ declaration in the web.config file. I came to realize that the error message, which stated: The type 'MySqlConnection' exists in both 'MySql.Data’ versions, was referring to an extra declaration.
I simply commented out the declaration in my web.config file and the code compiled fine without errors. I’m sorry to have troubled all of you about this.