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编辑过]
" " & name & " "
减掉一对单引号,试试看。
[此贴子已经被作者于2010-2-1 12:27:51编辑过]
以下是引用kylin在2010-2-1 12:28:00的发言: " " & name & " "
减掉一对单引号,试试看。
[此贴子已经被作者于2010-2-1 12:27:51编辑过]
不可以吧,NAME是字符呢.
试了,启动时加载失败!
以下是引用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
if e.DataTableName = "" & name & "" AndAlso e.User.Type <> UserTypeEnum.Developer then
e.SelectString = "Select * From {" & name & "} Where [_Identify] Is Null "
以下是引用狐哥在2010-2-1 13:35:00的发言:
这个也不行呢,CONTAINS出错
[此贴子已经被作者于2010-2-1 14:53:57编辑过]
以下是引用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 "
为什么????不明白
这个可以.
咱还是没搞清楚,何时加" " 何时加' '的问题.