以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]代码问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=121908)

--  作者:紫色幽魂
--  发布时间:2018/7/15 16:17:00
--  [求助]代码问题
这段代码有问题,总是提示错误,是怎么回事
提示信息:从字符串“工程编号 = \'20180702010\'”到类型“Long”的转换无效

Dim gcbh As WinForm.TextBox = e.Form.Controls("工程编号")
Dim jypbh As WinForm.TextBox = e.Form.Controls("检验批编号")
Dim jyp As WinForm.DropDownBox = e.Form.Controls("DropBox2")
Dim h As DataRow = DataTables("无损_检验批").SQLFind("工程编号 = \'"& gcbh.Value &"\'" And "检验批 = \'"& jyp.Value &"\'")
If jypbh.Value = h("检验批编号")
    Forms("增加行").Open
Else
    MessageBox.Show("请重新选择检验批","提示",MessageBoxButtons.OK)
    Return
End If


--  作者:有点甜
--  发布时间:2018/7/15 19:09:00
--  

 

Dim h As DataRow = DataTables("无损_检验批").SQLFind("工程编号 = \'" & gcbh.Value & "\' And 检验批 = \'"& jyp.Value &"\'")