System.Data.SqlClient Namespace for MySQL?
问题 The exception says that there is a network related problem, or that the SQL server does not allow remote access, none of those are true. Can it be that I'm trying to connect a MySQL server, and not MS SQL? Thanks 回答1: It is because the System.Data.SqlClient namespace is designed for Microsoft SQL Server, to connect to MySQL you will need to download and reference the MySQL .NET Connector http://dev.mysql.com/downloads/connector/net/. You will then use the System.Data.MySqlClient namespace.