MySQL基本语句和连接字符串
2007-11-11 13:13:23 来源:WEB开发网核心提示:需要先下载MySQL(和PHP搭配之最佳组合)net.exe,安装后引用CoreLab.MySQL(和PHP搭配之最佳组合).dll基本语句insert into `mis`.`users` ( name, age) values ( "ywm", 13)select id, name, age
需要先下载MySQL(和PHP搭配之最佳组合)net.exe,安装后引用CoreLab.MySQL(和PHP搭配之最佳组合).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
连接字符串
MySQL(和PHP搭配之最佳组合)Connection conn = new MySQL(和PHP搭配之最佳组合)Connection("User Id=root;Password=sa;Host=localhost;Database=mis;");
conn.Open();
MySQL(和PHP搭配之最佳组合)DataAdapter da = new MySQL(和PHP搭配之最佳组合)DataAdapter("select id, name, age from `mis`.`users` ",conn);
DataSet ds = new DataSet();
da.Fill(ds,"users");
conn.Close();
DataGrid1.DataSource= ds;
DataGrid1.DataBind();
更多精彩
赞助商链接