If e.DataCol.Name = "数量_本次收"
Dim cmd3 As New SQLCommand
cmd3.C
cmd3.CommandText="select 当前库存 from {产品资料子表} Where 料号 = '" & e.DataRow("OPN") & "'"
Dim kc As Integer = cmd3.ExecuteScalar
msgbox(kc + e.NewValue)
Dim cmd2 As New SQLCommand
cmd2.C
cmd2.CommandText = "Update {产品资料子表} SET 当前库存 ="' & kc + e.NewValue & "' where 料号 = '" & e.DataRow("OPN") & "'"
cmd.ExecuteNonQuery()
End If
msgbox得出的值是正确,但是set值无效..当前库存没有更新,也没有任何错误提示..
[此贴子已经被作者于2013-3-26 23:22:06编辑过]