以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- ')' 附近有语法错误。 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=151717) |
-- 作者:BG小白 -- 发布时间:2020/7/2 3:35:00 -- ')' 附近有语法错误。 Dim cb1 As WinForm.ComboBox = e.Form.Controls("ComboBox2") Dim StartDate As Date = e.Form.Controls("StartDate").value Dim Enddata As Date = e.Form.Controls("EndDate").value If (e.Form.Controls("StartDate").text = "") Then MessageBox.Show("请选择开始时间","提示") Return Else If (e.Form.Controls("EndDate").text = "") Then MessageBox.Show("请选择结束时间","提示") Return End If If cb1.text = "" Then MessageBox.Show("请选择店铺","提示") Return End If DataTables("SDPHD").LoadFilter = " DM1 = \'" & cb1.text & "\' And DM2 = 004 AND RQ >= "\' & StartDate & "\' And RQ <= "\' & EndDate & "\'" DataTables("sdphd").load() .NET Framework 版本:4.0.30319.42000 Foxtable 版本:2020.5.29.8 错误所在事件:加载[SDPHD]失败! 详细错误信息: \')\' 附近有语法错误。 测试发现是红色部分报错,但是这句没有错啊,应该是黄色的部分错了 所以我修改了一下 DataTables("SDPHD").LoadFilter = "RQ >= "\' & StartDate & "\' And RQ <= "\' & EndDate & "\' DM1 = " & cb1.text & " And DM2 = 004" 但是还是报相同的错误,搞不清楚了 [此贴子已经被作者于2020/7/2 6:12:05编辑过]
|
-- 作者:hnguang -- 发布时间:2020/7/2 7:41:00 -- DataTables("SDPHD").LoadFilter = "RQ >= "\' & StartDate & "\' And RQ <= "\' & EndDate & "\' DM1 = " & cb1.text & " And DM2 =\'004\' " |
-- 作者:有点蓝 -- 发布时间:2020/7/2 9:03:00 -- 先看5遍:http://www.foxtable.com/webhelp/topics/1284.htm,如果下次还有同样问题,每次先看5遍再去看自己的代码 DataTables("SDPHD").LoadFilter = " DM1 = \'" & cb1.text & "\' And DM2 = 004 AND RQ >= & StartDate & "\' And RQ <= \'" & EndDate & "\'" 比如自己区分一下有什么不同: msgbox(" DM1 = \'" & cb1.text & "\' And DM2 = 004 AND RQ >= "\' & StartDate & "\' And RQ <= "\' & EndDate & "\'") msgbox(" DM1 = \'" & cb1.text & "\' And DM2 = 004 AND RQ >= & StartDate & "\' And RQ <= \'" & EndDate & "\'")
[此贴子已经被作者于2020/7/2 9:03:23编辑过]
|
-- 作者:BG小白 -- 发布时间:2020/7/2 10:39:00 -- 好的 |