以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  update的相关问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=130669)

--  作者:cd_tdh
--  发布时间:2019/1/28 16:39:00
--  update的相关问题

老师我在表A中,把审批状态添加待表“待办事项”后,

Dim cmd1 As New SQLC  ommand
cmd1.C
cmd1.CommandText = "  u  pdate {待办事项} set [审批状态]=\'" & e.DataRow("审批状态") & "\'  WHERE [ID]=\'" & e.DataRow("ID") & "\'"
cmd1.Execute  NonQuery()

“待办事项”表的DataColChanged事件不会触发呢?

“待办事项”表DataColChanged事件代码:

If e.DataCol.Name = "审批状态" Then
    If e.DataRow.IsNull("审批状态") Then
        e.DataRow("待审批人") = Nothing
        e.DataRow("待办事项") = Nothing

    ElseIf e.DataRow("审批状态") = "待工程部经理审批" Then
        e.DataRow("待审批人") = "工程部经理"
        e.DataRow("待办事项") = (("【" & e.DataRow("表名") & "】") & "需要审批,请及时审批!")

    End If
    e.DataRow.save
End If


--  作者:有点蓝
--  发布时间:2019/1/28 16:46:00
--  
这个是直接保存到后台数据库。和前台没有关系,项目任何事件都不会触发