以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  关于项目打开不加载数据  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=50197)

--  作者:wealthwind
--  发布时间:2014/5/1 7:58:00
--  关于项目打开不加载数据
我的项目打开我希望不加载任何数据,以下是我的所有表,我在BeforeLoadOuterTable,写的代码~~~~~~~~~~~~~~~~~~~~这样是可行了,但我感觉有一点累赘,是否有更好的更简单的代码??


Select Case e.DataTableName
     Case "订单" 
            e.SelectString = "Select * From {订单} Where [_Identify] Is Null"
     Case "人员" 
            e.SelectString = "Select * From {人员} Where [_Identify] Is Null"
     Case "经销商信息" 
            e.SelectString = "Select * From {经销商信息} Where [_Identify] Is Null"
     Case "专卖店目标" 
            e.SelectString = "Select * From {专卖店目标} Where [_Identify] Is Null"
     Case "专卖店签约" 
            e.SelectString = "Select * From {专卖店签约} Where [_Identify] Is Null"
     Case "产品VLOOKUP" 
            e.SelectString = "Select * From {产品VLOOKUP} Where [_Identify] Is Null"
     Case "文具领用" 
            e.SelectString = "Select * From {文具领用} Where [_Identify] Is Null"
     Case "目标" 
            e.SelectString = "Select * From {目标} Where [_Identify] Is Null"
     Case "个案申请" 
            e.SelectString = "Select * From {个案申请} Where [_Identify] Is Null"
     Case "文件管理" 
            e.SelectString = "Select * From {文件管理} Where [_Identify] Is Null"
     Case "文具明细" 
            e.SelectString = "Select * From {文具明细} Where [_Identify] Is Null"
     Case "行政区域" 
            e.SelectString = "Select * From {行政区域} Where [_Identify] Is Null"
     Case "企业信息" 
            e.SelectString = "Select * From {企业信息} Where [_Identify] Is Null"
End Select

--  作者:lsy
--  发布时间:2014/5/1 8:10:00
--  
For Each s As String In "订单|人员|经销商信息|专卖店目标|专卖店签约|产品VLOOKUP|文具领用|目标|个案申请|文件管理|文具明细|行政区域|企业信息".Split("|")
    If e.DataTableName = s Then
        e.SelectString = "Select * From {" & s & "} Where [_Identify] Is Null"
    End If
Next
[此贴子已经被作者于2014-5-1 8:11:05编辑过]

--  作者:ybil
--  发布时间:2014/5/1 8:16:00
--  
Select Case e.DataTableName
   Case "订单","人员","经销商信息","专卖店目标","专卖店签约","产品VLOOKUP","文具领用","目标","个案申请","文件管理","文具明细","行政区域","企业信息" 
      e.SelectString = "Select * From {" & e.DataTableName & "} Where [_Identify] Is Null"
End Select

--  作者:wealthwind
--  发布时间:2014/5/1 8:28:00
--  
谢谢各位,已经解决了~~FOXTABEL真好~