16,552
社区成员
发帖
与我相关
我的任务
分享
Private Sub OnSaveData()
If cb Is Nothing Then
cb = New OleDbCommandBuilder
cb.DataAdapter = da
'设定更新命令
da.UpdateCommand = cb.GetUpdateCommand
'设定插入命令
da.InsertCommand = cb.GetInsertCommand
'设定删除命令
da.DeleteCommand = cb.GetDeleteCommand
End If
'将更改保存到数据库中
da.Update(dt)
Me.StatusBar1.Text = "数据已更新"
End Sub