请教老师:以下代码其中这段
cmd.commandtext = "execute CKXPE '" & str & "'" 中的"execute CKXPE "如何理解?我看了SQL帮助文件始终没有理解,请老师指点,谢谢!
表事件
出入库明细_AfterEdit
Dim win As
WinForm.form
If Forms("出入库加").Opened
Then
win = Forms("出入库加")
else
win = Forms("出入库改")
End If
If e.Col.name =
"货品编码" Then
Dim cmd As New SQLCommand
cmd.C
Dim dt As DataTable
dim str as string = e.row("货品编码")
cmd.commandtext = "execute CKXPE
'" & str & "'"
dt = cmd.ExecuteReader()
if dt.DataRows.count <> 0 then
e.row("单号") =
win.Controls("TextBox2").value
e.row("品名") =
dt.datarows(0)("货品名称")
e.row("单位") =
dt.datarows(0)("计量单位")
e.row("规格") =
dt.datarows(0)("规格型号")
e.row("单价") =
dt.datarows(0)("入库参考价")
else
if e.row("货品编码") <>
"" then
msgbox("录入的货品编码不存在!",0,"提示")
e.row("货品编码") =
""
end if
end if
end if
e.row("金额")
= e.row("单价") * e.row("数量")
win.Controls("TextBox4").value
= "¥ " & e.table.Compute("Sum(金额)") & " 元"