System.Data.SqlClient Namespace for MySQL?

£可爱£侵袭症+ 提交于 2020-01-04 07:18:46

问题


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. Hope this helps.



来源:https://stackoverflow.com/questions/3764953/system-data-sqlclient-namespace-for-mysql

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!