For Each r As Row In Tables("入库明细")
Dim filter As String = "产品条码 ='" & r("产品条码") & "' and 库房 = '" & r("库房") & "' And 库区 ='" & r("库区") & "' And 库位 =" & r("库位")
Dim cmd As new SQLCommand
cmd.C
cmd.CommandText= "select 库存数量 From {库存表} where " & filter
Dim v As Integer = cmd.ExecuteScalar
MessageBox.Show(v)
Dim cmd1 As new SQLCommand
cmd1.C
cmd1.CommandText = "Update {库存表} set 库存数量 = v +" & r("入库数量") & " where " & filter
MessageBox.Show(v + r("入库数量"))
cmd1.ExecuteNonQuery()
'If cmd1.ExecuteNonQuery < 0
'Dim dr As DataRow = DataTables("库存表").AddNew()
'Dim sts1 As String() ={"货号","颜色","尺码号","产品条码","产品名称","库房","库区","库位","库存数量","品牌"}
'Dim sts2 As String() ={"货号","颜色","尺码号","产品条码","产品名称","库房","库区","库位","入库数量","品牌"}
'For i As Integer = 0 To sts1.length -1
'dr(sts1(i)) = r(sts2(i))
'dr.save()
'Next
'End If
Next
这样一段代码,两个Message.box.show均正确显示想验证的值后,突然出现一个错误提示”至少一个参数没有被指定“,请教各位错哪里。
(如果取消被注释的代码的注释状态,会多出现异常同样的错误提示)