VB中datagrid中导入的数据怎么修改

就是直接在datagrid中直接修改也就是要在 编程运行的时候 直接在datagrid中直接修改是不是要重新编程才能得以修改我的数据库样式编号 地区 年龄 性别 身高 胸围 腰围 臀围1 北京 30 男 175 88 76 902 天津 25 男 170 87 75 903 石家庄 20 男 172 89 77 92编号 自动编号地区 性别 文本类型其他的都是 数字类型 双精度应经用ADODC控件导入 在dategrid中显示出来了剩下就是修改、添加、删除还有就是 数据库 已经做好 怎么 再增加“列”(在不修改数据库的情况下 直接用 VB添加) 如 添加 “臂长”这一列
2026年09月27日 04:49
有2个网友回答
网友(1):

make a dataadapter to update
example:
dim conmntr as string="the provider address"
dim stqlstr as string="the sql statement"
dim dt as new datatable()
Dim dataAdapter As New OleDb.OleDbDataAdapter(sqlStr, connStr)
dataAdapter.Fill(dt)
dataAdapter.Dispose()

remember tick the datagrid属性中有选择的。修改、添加、删除
then
make any changer include insert,delete or update can be use by
dataAdapter.update=dt
(maybe some mistake here because i am not really remember the update command,if u can not handle this please pm me and i will help you to check the correct the code)

网友(2):

datagrid属性中有选择的。修改、添加、删除 都可以实现。不过前提是本窗体连接的你要操作的表