Microsoft OLE DB Provider for SQL Server 错误 '80040e14' 第 1 行: '=' 附近有语法错误。
代码如下:在显示分页时提示出错,Microsoft OLE DB Provider for SQL Server 错误 '80040e14' 第 1 行: '=' 附近有语法错误。 第28行.
代码:
<!--#include file="../Include/Config.asp"-->
<%
if session("StuName")="" then
%>
<!--#include file="Include/headx.asp"-->
<%else%>
<!--#include file="Include/Headx_Session.asp"-->
<%end if%>
<LINK
href="../css/red.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.aaa {
border-bottom-width: 1px;
border-bottom-style: dotted;
border-bottom-color: #999999;
}
.STYLE2 {
font-size: 20px;
font-weight: bold;
color: #000000;
}
.STYLE3 {color: #FF0000}
-->
</style>
<%
userid=request.QueryString("userid")
set rs1=conn.execute("select * from wuser where userid="&userid&"")
set rsa=conn.execute("select * from zhuanye where zhuanyeid="&rs1("zhuanyeid")&"")
set rsb=conn.execute("select * from xxzx_zy where xxzx_zy_name like '%"&trim(rsa("zhuanyename"))&"%'")
xxzx_zy_id=rsb("xxzx_zy_id")
xxzx_wz_type=2
xxzx_wz_lm_type=2
%>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="170" rowspan="5" valign="top"><!-- #include file="Include/Left_Session_vip.asp" --></td>
<td width="2" rowspan="2" align="center"> </td>
<td valign="top">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#B2D3F6">
<% set rs= Server.CreateObject("adodb.recordset")
sql="select * from xxzx_wz where xxzx_zy_id="&xxzx_zy_id&" and xxzx_wz_type="&xxzx_wz_type&" and xxzx_wz_lm_type="&xxzx_wz_lm_type&" order by xxzx_wz_date desc"
rs.open sql,conn,1,1
rs.pagesize=20
page=request.QueryString("npage")
if page="" then
page=1
else
rs.absolutepage=page
end if %>
<% if rs.eof then %>
<tr bgcolor="#FFFFFF">
<td height="25" colspan="2" align="center" valign="middle" bgcolor="#FFFFFF"><span style="font-weight: bold; color: #003399">对不起,暂未发布</span></td>
</tr>
<% end if %>
<% if not rs.eof then %>
<tr>
<td height="30"> <span style="font-weight: bold">标题</span></td>
<td height="30"> <span style="font-weight: bold">发布时间</span></td>
</tr>
<% for i=1 to rs.pagesize
set rsa=conn.execute("select * from xxzx_kc where xxzx_kc_id="&rs("xxzx_kc_id")&"")%>
<tr bgcolor="#FFFFFF" onMouseOver="this.bgColor='#FFFEE9';" onMouseOut="this.bgColor='#FFFFFF';">
<td width="76%" height="30" align="left" > 【<%=rsa("xxzx_kc_name")%>】<a href="<%=rs("xxzx_wz_filename")%>"><%=left(rs("xxzx_wz_name"),15)%>...</a></td>
<td width="24%" align="left"> <%=left(rs("xxzx_wz_date"),10)%></td>
</tr>
<% rs.movenext
if rs.eof then
exit for
end if
next
%>
<tr bgcolor="#FFFFFF">
<td colspan="2" align="left" valign="bottom" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"> <% if page=1 then
response.Write("首页 上一页")
else %>
<a href="?xxzx_zy_id=<%=xxzx_zy_id%>&id=<%=id%>&xxzx_wz_type=2&xxzx_wz_lm_type=2&npage=1">首页</a>
<a href="?xxzx_zy_id=<%=xxzx_zy_id%>&id=<%=id%>&xxzx_wz_type=2&xxzx_wz_lm_type=2&npage=<%=page-1 %>">上一页</a>
<% end if %>
<% if cint(page)=rs.pagecount then
response.Write("下一页 尾页")
else%>
<a href="?xxzx_zy_id=<%=xxzx_zy_id%>&id=<%=id%>&xxzx_wz_type=2&xxzx_wz_lm_type=2&npage=<%=page+1 %>">下一页</a>
<a href="?xxzx_zy_id=<%=xxzx_zy_id%>&id=<%=id%>&xxzx_wz_type=2&xxzx_wz_lm_type=2&npage=<%=rs.pagecount %>">尾页</a>
<% end if %>
您当前在<font color="red"><b><%=page%></b></font>页 共<%=rs.pagecount%>页 共<%=rs.recordcount %>条记录</td>
</tr>
<tr>
<td align="center"> </td>
</tr>
</table>
<% end if
rs.close
set rsa=nothing
set rs=nothing %> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="30" colspan="2" align="left" bgcolor="#FFFFFF"><span class="STYLE2"> <span class="STYLE3"><a href="http://www.chinazk-edu.com/chinazk/free/index.asp">更多试题下载请点击进入....</a></span></span></td>
</tr>
</table></td>
</tr>
</table>
请各位高手帮个忙|!!!!