商品查询分页出了问题
<%@ LANGUAGE="VBScript" %><script language="VBScript" runat="server" ></script>
<html>
<head></head>
<body>
<center>
<%
' 注释:生成SQL查询语句
mysql = "SELECT spxx.商品编号,spxx.商品名称, lb.类别名称, spxx.零售价,gys.厂商名称 " & _
"FROM ((spxx " & _
"INNER JOIN gys ON spxx.厂商编号= gys.厂商编号) " & _
"INNER JOIN lb ON spxx.类别编号= lb.类别编号) " & _
"WHERE 商品名称 LIKE '%" & Request("spmc") & "%'"
' 注释:连接数据库
Set objRS = Session("objRS")
'if objRS.state=adstateopen then objRS.close
objRS.Source = mysql
objRS.Open
' 注释:显示查询结果
If objRS.RecordCount > 0 Then
' 注释:设置分页信息
If Request("ps") = "" Then
objRS.PageSize = 10
Else
objRS.PageSize = CInt(Request("ps"))
End If
If Request("pn") = "" Then
CurPage = 1
Else
CurPage = CInt(Request("pn"))
End if
objRS.AbsolutePage = CurPage
' 注释:显示分页信息
Response.Write("共有【" & objRS.RecordCount & "】条记录")
' 注释:制作分页导航
If objRS.PageCount > 1 Then
Response.Write(",分成【" & objRS.PageCount & "】页:")
For i = 1 to objRS.PageCount
If i = CurPage Then Response.Write("<b>")
Response.Write("<a href=qsc2.asp?")
Response.Write("&ps=" & objRS.PageSize)
Response.Write("&pn=" & i)
Response.Write(">" & i & "</a> ")
If i = CurPage Then Response.Write("</b>")
Next
End If
Response.Write("<p>")
Response.Write("<table border='1' width='80%'>")
Response.Write("<tr align='left'>")
Response.Write("<th>商品编号</th>")
Response.Write("<th>商品名称</th>")
Response.Write("<th>类别</th>")
Response.Write("<th>零售价</th>")
Response.Write("<th>生产厂商</th>")
Response.Write("</tr>")
' 注释:读取并显示查询结果
For i = 1 to objRS.PageSize
If objRS.EOF Then Exit For
Response.Write("<tr>")
Response.Write("<td>" & objRS("商品编号") & "</td>")
Response.Write("<td>" & objRS("商品名称") & "</td>")
Response.Write("<td>" & objRS("类别名称") & "</td>")
Response.Write("<td>" & objRS("零售价") & "</td>")
Response.Write("<td>" & objRS("厂商名称") & "分</td>")
Response.Write("</tr>")
objRS.MoveNext
Next
' 注释:关闭记录集
objRS.Close
Set objRS = Nothing
%>
</center>
</body>
</html>
大家好,我不加带颜色的那一部分时一切都正常运行,但我一加上就在红色那块提示我出错,错误信息是:错误类型:
Microsoft VBScript 编译器错误 (0x800A03F6)
缺少 'End'
/xiaolaba3330/qsc2.asp, 第 72 行
请问大家这是怎么回事啊?