I have been searching on multilple web sites to have an answer, and that i did not find anything.

I'm trying på create a link between Visual Studio 2010 Ultimate and SQL Server Management Studio. I simply designed a small program just to ascertain if the bond works.

Each time I am attempting to connect, Versus throws an ODBCexception.

"ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect with MySQL server on 'localhost' (10061)"

This really is my connectionstring:

DRIVER={MySQL ODBC 3.51 Driver};Data Source=MY-USERNAME\\SQLEXPRESS;Initial Catalog=MY-DATABASE;Integrated Security=True

This connection string was replicated from the data connection I have made inside Versus.

Inflict one possess the miracle solution???

Please and thanks! :)


At this time, you are mixing the MySQL driver (DRIVER={MySQL ODBC 3.51 Driver}) having a Microsoft SQL Server Express server title (Data Source=MY-USERNAME\\SQLEXPRESS;) - which you may not wish to connect with??

If you wish to connect with SQL Server Express (which will come bundled up with Visual Studio), you should utilize the native .Internet SQL client (and never the ODBC stuff).

For the reason that situation, your connection string could be something similar to:

server=YourMachine\\SQLEXPRESS;Database=MYDATABASE;Integrated Security=True

or something like that similar - see ConnectionStrings.com for a lot of samples.

Within this situation, you need to use classes like SqlConnection, SqlCommand, SqlDataReader in the System.Data.SqlClient namespace inside your application.