Mysql 绑定dataGridView不怎么会绑定
MySqlConnection mysqlconn = new MySqlConnection
("Database='" + "mysql" + "';Data Source='" + "localhost" + "';User Id='" + "root" + "';Password='" + "1" + "';Port='" + "3306" + "'");
mysqlconn.Open();
MySqlCommand cmd = new MySqlCommand("SELECT 姓名,序号 FROM 帐号信息表");
MySqlDataAdapter adapter = new MySqlDataAdapter(cmd.ToString(), mysqlconn);
DataTable a = new DataTable();
adapter.Fill(a);
this.dataGridView1.DataSource = a;
瞎写的,只知道大致思路,不知道怎么写
("Database='" + "mysql" + "';Data Source='" + "localhost" + "';User Id='" + "root" + "';Password='" + "1" + "';Port='" + "3306" + "'");
mysqlconn.Open();
MySqlCommand cmd = new MySqlCommand("SELECT 姓名,序号 FROM 帐号信息表");
MySqlDataAdapter adapter = new MySqlDataAdapter(cmd.ToString(), mysqlconn);
DataTable a = new DataTable();
adapter.Fill(a);
this.dataGridView1.DataSource = a;
瞎写的,只知道大致思路,不知道怎么写
...全文
相关推荐
datagridview的数据绑定
DataGridView常用操作,用于绑定DataGridView,修改DataGridView后并进行更新,适用与C#初学者
通过DataGridView与mysql交互的总结_200904[参考].pdf
通过DataGridView与mysql交互的总结_200904[参考].pdf
C#对DataGridView进行添加、修改、删除数据操作
C#对DataGridView进行添加、修改、删除数据操作C#对DataGridView进行添加、修改、删除数据操作
c#实现datagridview绑定到数据库的图像点击时显示在picturebox中
c#实现datagridview绑定到数据库的图像点击时显示在picturebox中
DataGridView绑定数据库扩展功能实例
DataGridView绑定数据库扩展功能实例,附加了很多报表功能,完全源码开发,几乎可以提到水晶了。


