gpt4 book ai didi

mysql - 使用 VB.NET 将 datagridview 中的多条记录插入到我的数据库表中

转载 作者:行者123 更新时间:2023-11-29 05:29:47 24 4
gpt4 key购买 nike

我想从datagridview插入记录到mysql数据库表,但我不知道如何将 datagridview 插入数据库 table。怎么做? :(

最佳答案

kumar,你的代码有问题

name = Me.DataGridView1.Rows(i).Cells(0).ToString()

age= Me.DataGridView1.Rows(i).Cells(1).ToString()

应该是

name = Me.DataGridView1.Rows(i).Cells(0).Value.ToString()

age= Me.DataGridView1.Rows(i).Cells(1).Value.ToString()

关于mysql - 使用 VB.NET 将 datagridview 中的多条记录插入到我的数据库表中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16031060/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com