asp textbox获取显示mysql数据示例代码
程序员文章站
2022-08-10 17:17:35
复制代码 代码如下: using mysql.data.mysqlclient; mysqlconnection conn = new mysqlconnection("s...
复制代码 代码如下:
using mysql.data.mysqlclient;
mysqlconnection conn = new mysqlconnection("server=(local);database=abc;uid=;pwd=");
conn.open();
mysqlcommand com = new mysqlcommand("select * from tb_xxjj",conn);
mysqldatareader dr = com.executereader();
dr.read();
tb_xxjj.text = dr["title"].tostring();
content.text = dr["content"].tostring();