Last post Sep 19, 2015 01:24 PM by Maurice Osborn
Sep 16, 2015 05:14 PM|Maurice Osborn|LINK
// Delete Profile table row
MySqlConnection conn = null;
conn = new MySqlConnection(EFMconn);
MySqlCommand cmd = new MySqlCommand(
"DELETE Profile WHERE MemberID = @OID", conn);
MySqlParameter param1 = new MySqlParameter();
param1.ParameterName = "@OID";
param1.Value = OID;
int rowsAffected = cmd.ExecuteNonQuery();
if (conn != null)
Sep 17, 2015 01:44 AM|Mukesh_Kumar|LINK
Please refer these link. I am sure this will help to resolve this issue.
Hope this will help you.
Sep 17, 2015 12:40 PM|Lannie|LINK
The MySQL data entity documentation states other MySQL connection components and drivers must be installed as well.
Sep 17, 2015 06:03 PM|Maurice Osborn|LINK
<add name="ENCdbConnectionString" connectionString="Data Source=.NET Framework Data Provider for MySQL;Initial Catalog=v1db;User id=Maurice;Password=123;Trusted_Connection=True"/>
#region MySqlConnection Connection and Page Lode
MySqlConnection conn = new
The following is how it is defined within the C# code of my web page:
string EFMconn = ConfigurationManager.ConnectionStrings["ENCdbConnectionString"].ToString();
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=184.108.40.206, Culture=neutral, PublicKeyToken=c5687fc88969c44d' and 'MySql.Data,
Version=220.127.116.11, Culture=neutral, PublicKeyToken=c5687fc88969c44d'
So, what am I doing wrong?
Sep 18, 2015 07:19 AM|Maurice Osborn|LINK
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.
Sep 19, 2015 01:24 PM|Maurice Osborn|LINK
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.