以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  关于表达式问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=20895)

--  作者:yankunhao
--  发布时间:2012/6/22 11:15:00
--  关于表达式问题

Dim s As String = e.Form.Controls("TextBox2").Text
    Dim t As WinForm.Table = e.Form.Controls("Table1")
    If s = "" Then
        s = ""
    Else
        s = "%" & s & "%"
        \'tbl.Filter = "item_no Like" & txt
    End If
   
    t.Table.Fill("select {obas_part1}.part_no As 内码编码,{obas_part}.item_no As 料品编码,{obas_part_spec}.cu_part_no As 客户编码,type_name As 料品类别,part_name As 料品名称,part_spec As 料品规格,base_name As 单位,{obas_part_spec}.wf_cp_ggrem As 规格备注,wf_cp_gz As 国家,wf_cp_kr As 客人,wf_bz_fs As 包装方式 From ((({obas_part1} Inner JOIN {obas_part} ON {obas_part1}.[part_no] = {obas_part}.[part_no]) Inner JOIN {obas_part_type} ON {obas_part1}.[part_type] = {obas_part_type}.[type_no]) Inner JOIN {obas_base_code} ON {obas_base_code}.[base_code] = {obas_part1}.[unit_no])  left join {obas_part_spec} on {obas_part1}.[part_no]= {obas_part_spec}.[part_no] Where {obas_base_code}.[code_type] = \'" & 115 & "\' And {obas_part1}.[part_type] Like \'" & 1% & "\'And {obas_part}.item_no = \'" & s & "\'
   Order By {obas_part}.item_no","erp",True)

 

 

请问我上面的代码为什么出错?



此主题相关图片如下:1.jpg
按此在新窗口浏览图片

--  作者:yankunhao
--  发布时间:2012/6/22 11:51:00
--  
现在可以了