Dim kmdaima As WinForm.TextBox = e.Form.Controls("kemudaima")
cmd.CommandText = "Select Count(*) From {科目表} Where SubString(科目代码,1,LEN(kmdaima.text))= '" & kmdaima.Text & "'"
If cmd.ExecuteScalar > 0 Then
Messagebox.show("删除科目失败,请先删除此科目的下级科目!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return
End If
我想要做的就是当e.Form.Controls("kemudaima")中输入的代码在科目表中有子科目则不能执行删除
请高手给看一下,这段代吗中cmd.CommandText中有什么问题,为什么参数参数传递不过去,