简体   繁体   中英

how to Insert update delete mysql database from datagridview

我想使用datagridview插入更新和删除mysql数据库,但我还没有找到任何相关教程,找到了一些有关sql女士的教程,但我希望在mysql中提供帮助。

i use this approach

 this.id = string.Empty;
 using (MySqlConnection mysqlConn = new MySqlConnection(this.connString))
 {
   string mysqlQuery = @"SELECT * from Student";
   using (MySqlDataAdapter ad = new MySqlDataAdapter(mysqlQuery, this.connString))
     {
       DataSet ds = new DataSet();
       ad.Fill(ds);
       dgvStudentDelete.DataSource = ds.Tables[0];
     }
 }

but no idea about how to directly do it from datagridview

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM