标题:更新数据库的问题
只看楼主
mengqi
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2005-5-7
 问题点数:0 回复次数:1 
更新数据库的问题
如下程序
 
  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生成
怎么解决阿
搜索更多相关主题的帖子: 数据库 
2005-05-08 16:04
lcb3838
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2005-6-8
得分:0 
adaper.update(dset.aa)试看看
2005-06-08 18:47



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-17629-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.693303 second(s), 9 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved