比如这句:Set Rs = Conn.Execute("update [AD] set 剩余积分 = 剩余积分 - " &
cpoint.Text & " where adID = '" & adid1.Text & "'")我想判断剩余积分如果没有那么多,是不能减的!
cpoint.Text & " where adID = '" & adid1.Text & "'")我想判断剩余积分如果没有那么多,是不能减的!
update ad set 剩余积分=剩余积分-cpoint.Text where adid=adid1.Text and 剩余积分>=cpoint.Text
Set 剩余积分=(Case When (剩余积分 - " & cpoint.Text & ")>=0 Then (剩余积分 - " & cpoint.Text & ")
Else 你的另一种计算表达式
End)
Where adID = '" & adid1.Text & "'"