Foxtable(狐表)用户栏目专家坐堂 → 删除记录的代码问题


  共有2133人关注过本帖树形打印复制链接

主题:删除记录的代码问题

帅哥哟,离线,有人找我吗?
0855yangjing
  1楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:婴狐 帖子:36 积分:321 威望:0 精华:0 注册:2020/6/7 23:33:00
删除记录的代码问题  发帖心情 Post By:2020/9/12 18:34:00 [显示全部帖子]

请问哪里出了问题,以前可以删除记录的,几个月了就不可以了?
Dim Filter   As   String
With e.Form.Controls("Comzjh")
    If .Value   IsNot   Nothing  Then
        Filter =   "主机号 = '" & .Value &   "'"
    End   If
End   With
With e.Form.Controls("Comhlh")
    If .Value   IsNot   Nothing   Then
        If Filter > ""   Then
            Filter = Filter &   " And "
        End   If
        Filter = Filter &   "回路号 = '" & .Value &   "'"
        Tables("报警设备定义").Filter = Filter
        Dim dr As DataRow
        dr = DataTables("报警设备定义").Find(Filter)
        Dim Result As DialogResult
        Result = MessageBox.Show("你确定要删除该回路的所有数据吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question)
        If Result = DialogResult.Yes Then
            DataTables("报警设备定义").DeleteFor("回路号 = '" & .Value &   "'")
        Else
            MessageBox.Show("请及时保存修改的数据!","提示")
        End If
    End   If
End   With
[此贴子已经被作者于2020/9/12 18:53:35编辑过]

 回到顶部