以文本方式查看主题 - Foxtable(狐表) (http://www.foxtable.com/bbs/index.asp) -- 专家坐堂 (http://www.foxtable.com/bbs/list.asp?boardid=2) ---- 后台锁定行操作 (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=175523) |
-- 作者:lfz -- 发布时间:2022/3/8 11:30:00 -- 后台锁定行操作 为啥没实现呢 Dim cmd As new SQL Command |
-- 作者:有点蓝 -- 发布时间:2022/3/8 11:48:00 -- 有多余空格:Where 申请单号 = \'" & dh & "
\'" Dim cmd As new SQL Command
cmd.C Dim dt1 As DataTable cmd.CommandText = "update {入库单} set [_locked]=1 Where 申请单号 = \'" & dh & "\'" cmd.ExecuteNonQuery() |
-- 作者:lfz -- 发布时间:2022/3/8 13:35:00 -- 回复:(有点蓝)有多余空格:Where 申请单号 = '" &a... 还是不能锁定,我用的是access数据库,
Dim dh As String = Forms("申请单录入").Controls("tb申请单号").Value
Dim cmd As new SQLCommand
[此贴子已经被作者于2022/3/8 13:42:05编辑过]
|
-- 作者:有点蓝 -- 发布时间:2022/3/8 13:42:00 -- Dim dh As String = Forms("申请单录入").Controls("tb申请单号").text |
-- 作者:lfz -- 发布时间:2022/3/8 13:46:00 -- 回复:(有点蓝)Dim dh As String = Forms("申请单录... dh 是已经输入完的值,不是正在输入的值,应该不是这个问题引起的吧 |
-- 作者:有点蓝 -- 发布时间:2022/3/8 14:11:00 -- access改为:cmd.CommandText = "u pdate {入库单} set [_locked]=true Where 申请单号 = \'" & dh & "\'" 如果MessageBox弹不出来,说明这个事件根本就没有执行到。代码是放在哪里的? |