MySQL Connector/Net 是 MySQL 官方的 .NET 驱动程序,MySQL 官方的 .NET 推广客户端开发包。mysql 数据库最新版dotnet数据库连接驱动。
mysql|connector|net
从6.7版开始,Connector/Net将不再包含MySQLforVisual Studio集成。这功能目前可在一个单独的商品,名为MySQL为Visual Studio(见http://dev.mysql.com/tech|resources/articles/mysql|installer|for|windows.html)用MySQL安装程序。
用首要条件:(用一种即可)
1. 在web程序中,引用—》添加引用—》程序集—》扩展下,首要条件是安装了mysql|connector|net
2. 手工下载MySql.Data.dll,然后添加引用
注意:这种方法一般用于存有“代码后置”的页面文件aspx(aspx.cs)、ashx
用:
1.添加引用:using MySql.Data. MySqlClient;
2.目前页面就能用了
测试代码:
1 System.Data.DataSet ds = new System.Data.DataSet;
2 string connStr = @Database=testss;Data Source=172.168.0.234;User Id=root;Password=shinevod;
3 string sqlList = select * from sms|outbox;
4 try
5 {
6 using )
7 {
8 dataAapter.Fill;
9 Response.Write);
10 }
11 }
12 catch
13 { }
TAG标签:MySQL(5)Connector(1).NET开发(1)
转载请说明来源于当下软件园(https://www.gpsdan.com)
本文地址:https://www.gpsdan.com/soft/21324.html
郑重声明:文章来源于网络作为参考,本站仅用于分享不存储任何下载资源,如果网站中图片和文字侵犯了您的版权,请联系我们处理!邮箱3450399331@qq.com