Question Vb error for Mysql

gate7cy

Well-known member
Joined
May 11, 2009
Messages
119
Programming Experience
3-5
Hello. I am using mysql together with Visual Studio 2008 and I getting a weird error. I have search for it online but none of the, few, solutions available has helped me. The error I get is

mysqlcommand is ambiguous in the namaspace mysql.data.mysqlclient

I removed and entered the Mysql reference many times. I downloaded different connector versions and I still get the same problem. I am importing these at every form:

VB.NET:
Imports System
Imports System.Data
Imports MySql.Data
Imports MySql.Data.MySqlClient

There is no other reference for mysql in the project. I cannot understand ... Please help mee.......


Thanks for the replies
 
The error means that there are two classes sharing the same name. Most likely MySQLCommand exists in MySQL.Data and MySQL.Data.MySQLClient...remove one of this references, or explicit declare the class (with MySQL.Data.MySQLCommand f.e.).

Bobby
 
thanks for the reply. I found the problem being that I added too many references of different mysql refs. I had MySql.Data, MySql.Data.CF, MySql.Data.Entity. I removed the last two and is ok. I am trying though to add a table adapter to a form and I am getting a huge error and does not allow me to add it. Cheers
 
Back
Top