Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共12 条记录, 每页显示 10 条, 页签: [1] [2]
[浏览完整版]

标题:加截外部数具-哪位老师有空帮看看

1楼
狐哥 发表于:2010/2/1 12:23:00
Dim Names As String() = {"业务","费用","柜型","提单","进仓","核销"}
For Each Name As String In Names
    if e.DataTableName = " '" & name & "'" AndAlso e.User.Type <> UserTypeEnum.Developer then
        e.SelectString = "Select * From {'" & name & "'} Where [_Identify] Is Null "
    End If
next

如上代码有错,但不知NAME如何加符号.请教各位.
[此贴子已经被作者于2010-2-1 13:45:29编辑过]
2楼
kylin 发表于:2010/2/1 12:28:00
 " " & name & " "

减掉一对单引号,试试看。
[此贴子已经被作者于2010-2-1 12:27:51编辑过]
3楼
mr725 发表于:2010/2/1 12:55:00
Dim Names As String = "业务,费用,柜型,提单,进仓,核销" 
    if Names.contains(e.DataTableName) AndAlso e.User.Type <> UserTypeEnum.Developer then
        e.SelectString = "Select * From {'" & name & "'} Where [_Identify] Is Null "
    End If
4楼
狐哥 发表于:2010/2/1 13:12:00
以下是引用kylin在2010-2-1 12:28:00的发言:
 " " & name & " "

减掉一对单引号,试试看。
[此贴子已经被作者于2010-2-1 12:27:51编辑过]

不可以吧,NAME是字符呢.
试了,启动时加载失败!

5楼
狐哥 发表于:2010/2/1 13:35:00
以下是引用mr725在2010-2-1 12:55:00的发言:
Dim Names As String = "业务,费用,柜型,提单,进仓,核销" 
    if Names.contains(e.DataTableName) AndAlso e.User.Type <> UserTypeEnum.Developer then
        e.SelectString = "Select * From {'" & name & "'} Where [_Identify] Is Null "
    End If

这个也不行呢,CONTAINS出错

6楼
reachtone 发表于:2010/2/1 13:57:00
Dim Names As String() = {"业务","费用","柜型","提单","进仓","核销"}
For Each Name As String In Names
    if e.DataTableName = name AndAlso e.User.Type <> UserTypeEnum.Developer then
        e.SelectString = "Select * From {" & name & "} Where [_Identify] Is Null "
    End If
next
7楼
狐哥 发表于:2010/2/1 14:19:00
以下是引用reachtone在2010-2-1 13:57:00的发言:
Dim Names As String() = {"业务","费用","柜型","提单","进仓","核销"}
For Each Name As String In Names
    if e.DataTableName = name AndAlso e.User.Type <> UserTypeEnum.Developer then
        e.SelectString = "Select * From {" & name & "} Where [_Identify] Is Null "
    End If
next

单单用 name 不可以呢. 就是因为不行,我才加了""号,但还是出错
if e.DataTableName = name


图片点击可在新窗口打开查看此主题相关图片如下:片段_3.jpg
图片点击可在新窗口打开查看
8楼
yangming 发表于:2010/2/1 14:49:00
if e.DataTableName =  "" & name & "" AndAlso e.User.Type <> UserTypeEnum.Developer then
        e.SelectString = "Select * From {" & name & "} Where [_Identify] Is Null "
9楼
mr725 发表于:2010/2/1 14:52:00
以下是引用狐哥在2010-2-1 13:35:00的发言:

这个也不行呢,CONTAINS出错

 图片点击可在新窗口打开查看

[此贴子已经被作者于2010-2-1 14:53:57编辑过]
10楼
狐哥 发表于:2010/2/1 15:05:00
以下是引用yangming在2010-2-1 14:49:00的发言:
if e.DataTableName =  "" & name & "" AndAlso e.User.Type <> UserTypeEnum.Developer then
        e.SelectString = "Select * From {" & name & "} Where [_Identify] Is Null "

为什么????不明白
这个可以.

咱还是没搞清楚,何时加" " 何时加' '的问题.

共12 条记录, 每页显示 10 条, 页签: [1] [2]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02734 s, 2 queries.