高手帮忙 操作符丢失

来源:百度知道 编辑:UC知道 时间:2024/06/14 13:05:25
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] 语法错误 (操作符丢失) 在查询表达式 'parentID=' 中。
/lei2.asp, 第 19 行
运行这段代码,是正常的,一点下一页或者最后页就出现上面的错误提示,因为不翻页能正常运行,使用parentid开始是有值的 。
麻烦高手帮忙改下代码,先谢了~~~
能帮我解决问题,分有追加~~~
帖出代码:
<style type="text/css">
<!--
.STYLE2 {font-size: 24px}
.STYLE3 {
font-size: 16px;
color: #9900CC;
}
.STYLE4 {color: #9900CC}
-->
</style>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<%
if request.querystring("id")<>"" then
parentID=request.querystring("id")
end if
sql="select * from class where parentID="&parentID
Set rs=Server.CreateObject("ADODB.Recordset")
rs.open Sql,conn,1,3
if rs.bof and rs.eo

把这段:
<%
if(pageno <> 1)then
%>
<a href="?">第一页</a>
<%
End if
if(pageno <> 1)then
%>
<a href="?pageno=<%=(pageno-1)%>">上一页</a>
<%
end if
if(instr(pageno,cstr(rs.pagecount)) = 0)then
%>
<a href="?pageno=<%=(pageno+1)%>">下一页</a>
<%
end if
if(instr(pageno,cstr(rs.pagecount)) = 0)then
%>
<a href="?pageno=<%=rs.pagecount%>">最后一页</a>
<%
end if
rs.close
Set rs = Nothing
end if
end if
%>
__________________________________________________
改成:

<%
if(pageno <> 1)then
%>
<a href="?id=<%=parentID%>">第一页</a>
<%
End if
if(pageno <> 1)then
%>
<a href="?id=<%=parentID%>&pageno=<%=(pageno-1)%>"