更新数据库的问题
如下程序Private Sub Btndelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btndelete.Click
Dim dgrdelete As DialogResult
Try
dgrdelete = MessageBox.Show("delete this record?", "confirm delete", MessageBoxButtons.YesNo)
If dgrdelete = DialogResult.Yes Then
With mybm
.RemoveAt(.Position)
End With
Dim sqlcommand As New SqlCommandBuilder(adapter)
adapter.Update(dset, "aa")
dset.AcceptChanges()
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
运行时出现如下错误
对于不返回任何键列信息的seletecommand不支持deletecommand的动态sql生成
怎么解决阿