前导发轫:网海拾贝
需求先下载mysqlnet.exe,安置后引用CoreLab.MySql.dll
根基语句
insert into `mis`.`users` ( name, age) values ( "ywm", 13)
select id, name, age from `mis`.`users` limit 0, 50
delete from `mis`.`users` where id > 8
update `mis`.`users` set name = "ywm1" where id = 13
邻接字符串
MySqlConnection conn = new MySqlConnection("User Id=root;Password=sa;Host=localhost;Database=mis;");
conn.Open();
MySqlDataAdapter da = new MySqlDataAdapter("select id, name, age from `mis`.`users` ",conn);
DataSet ds = new DataSet();
da.Fill(ds,"users");
conn.Close();
DataGrid1.DataSource= ds;
DataGrid1.DataBind();
版权声明:
原创作品,承诺转载,转载时请务必以超链接体例标明文章 原始情由 、作者信息和本声明。否则将深究司法责任。