以下代码用户是用SQL SERVER 2008数据源,目的是如果王登录但只有全部合同及合同转换两张表加载数据,其他都是空表,但是会提示错误,是什么原因,怎么修改?
If _UserName = "王五" Then
For Each d As DataTable In DataTables
If d.name = "全部合同" Or d.name = "合同转换" Then
e.SelectString = "Sel ect * Fr om {d.name}"
Else
e.SelectString = "Se lect * Fr om {d.name} Where [_Identify] Is Null"
End If
Next
End If