以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  初始不加载表,查询时like怎么用  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=71995)

--  作者:foxstudent
--  发布时间:2015/7/21 21:23:00
--  初始不加载表,查询时like怎么用
请问我用外部数据源,初始不加载数据,下面的查询代码红色部分,在表加载后查询正常,如果没加载直接查,就查不到,应该怎么写?

With e.Form.Controls("T4")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
       Filter = Filter & "姓名  like \'*" & .Value & "*\'" 
    End If
End With



--  作者:大红袍
--  发布时间:2015/7/21 21:24:00
--  
With e.Form.Controls("T4")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
       Filter = Filter & "姓名  like \'%" & .Value & "%\'" 
    End If
End With
 
DataTables("表A").LoadFilter = Filter
DataTables("表A").Load

--  作者:yan2006l
--  发布时间:2015/7/21 21:28:00
--  

S ELECT * FROM {客户} WHERE 公司名称 LIKE \'%贸易%\'


--  作者:foxstudent
--  发布时间:2015/7/21 21:32:00
--  
谢谢!