MySQL的System.Data.SqlClient命名空间? [英] System.Data.SqlClient Namespace for MySQL?
问题描述
该异常表明存在网络相关问题,或者SQL Server不允许远程访问,所有这些都不是正确的。
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.
是否可以我正在尝试连接MySQL服务器,而不是MS SQL?
Can it be that I'm trying to connect a MySQL server, and not MS SQL?
谢谢
推荐答案
这是因为System.Data.SqlClient命名空间是为Microsoft SQL Server设计的,要连接到MySQL,您需要下载并引用MySQL .NET Connector http://dev.mysql.com/downloads/connector/net/ 。然后,您将使用System.Data.MySqlClient命名空间。希望这会有所帮助。
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. Hope this helps.
这篇关于MySQL的System.Data.SqlClient命名空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!