28,391
社区成员
发帖
与我相关
我的任务
分享
<!--#include file="include/conn.asp"-->
<!--#include file="include/fun.asp"-->
<%
dim depar
depar = Trim(Request("depar"))
if not isnumeric(depar) or depar="" then depar=0
dim where
if depar<>0 then
' sql="select * from [UserTable] where [Department]=1" '执行此sql则报错
sql="select * from [UserTable] where [Department]="& depar '这个也会报错(我确定Department字段存在且为数字类型)
'Response.Write(sql):Response.End()
else
sql="select * from [UserTable]" '这个可以正常执行
end if
'//本地运行正常,服务器上报错
set rs=conn.execute(sql)'报错的是这里
'set rs = Server.CreateObject("adodb.recordset")
'sql="select * from [UserTable] "&where&" order by uid asc"
'rs.open sql,conn,1,1 '这种方式同样报错
do while not rs.eof
%>
<a href="" onclick="insert('<%=rs("UserName")%>');return false;"><%=rs("UserName")%>(<%=getDepartment(rs("Department"))%>)</a><br/>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
<!--#include file="include/conn.asp"-->
<!--#include file="include/fun.asp"-->
<%
dim tid
tid = Trim(Request("tid"))
if not isnumeric(tid) or tid="" then tid=0
set rs=conn.execute("select * from [TopicList] where tid="&tid)
if not rs.eof then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right"> 录入人:</td>
<td align="left"> <%=rs("UserName")%> 分机号:<%=rs("TelPhone")%></td>
</tr>
<tr>
<td align="right"> 负责人:</td>
<td align="left"> <%=rs("Manage")%> 分机号:<%=rs("ManageTelPhone")%></td>
</tr>
<tr>
<td align="right"> 进度:</td>
<td align="left"> <%=getWorkState(rs("WorkState"))%></td>
</tr>
</table>
<%
else
Response.Write("没有找到对应的信息...")
end if
rs.close
set rs=nothing
%>