以文本方式查看主题
- Foxtable(狐表) (http://foxtable.net/bbs/index.asp)
-- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2)
---- 加截外部数具-哪位老师有空帮看看 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=5920)
|
-- 作者:狐哥
-- 发布时间: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编辑过]
|
-- 作者:kylin
-- 发布时间:2010/2/1 12:28:00
--
" " & name & " "
减掉一对单引号,试试看。
[此贴子已经被作者于2010-2-1 12:27:51编辑过]
|
-- 作者: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
|
|
-- 作者:狐哥
-- 发布时间:2010/2/1 13:12:00
--
以下是引用kylin在2010-2-1 12:28:00的发言: " " & name & " "
减掉一对单引号,试试看。
[此贴子已经被作者于2010-2-1 12:27:51编辑过]
不可以吧,NAME是字符呢. 试了,启动时加载失败!
|
-- 作者:狐哥
-- 发布时间: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出错
|
-- 作者: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
|
-- 作者:狐哥
-- 发布时间: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
|
-- 作者: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 "
|
-- 作者:mr725
-- 发布时间:2010/2/1 14:52:00
--
以下是引用狐哥在2010-2-1 13:35:00的发言:
这个也不行呢,CONTAINS出错
[此贴子已经被作者于2010-2-1 14:53:57编辑过]
|
-- 作者:狐哥
-- 发布时间: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 "
为什么????不明白 这个可以.
咱还是没搞清楚,何时加" " 何时加\' \'的问题.
|