| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 952 人关注过本帖
标题:[求助]怎么总是报错?
取消只看楼主 加入收藏
可见光
Rank: 1
等 级:新手上路
帖 子:143
专家分:0
注 册:2007-6-15
收藏
 问题点数:0 回复次数:5 
[求助]怎么总是报错?
哪个大哥大姐能帮我分析下啊! 小弟先谢谢了


错误类型:
Microsoft VBScript 编译器错误 (0x800A03F6)
缺少 'End'
/spss.asp, 第 81 行
源码:

<% '77
i=i+1 '78
if i>=MaxPerpage then exit do '79
rs.MoveNext '80
Loop '81
end Sub '82
%>
搜索更多相关主题的帖子: 编译器 Microsoft 大哥 
2007-08-10 16:49
可见光
Rank: 1
等 级:新手上路
帖 子:143
专家分:0
注 册:2007-6-15
收藏
得分:0 
回复:(可见光)[求助]怎么总是报错?
我现在把完整的代码给发上来,大家帮我改改吧!
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<!--#include file="conn.asp"-->
<%
spxl=request("spxl")
set rs=server.CreateObject("adodb.recordset")
sqltest="select *from Product"
if request("Product_Name")<>"" then
sqltext=sqltext&"where Product_Name like'%"&request("Product_Name")&"%'"
else
sqltext=sqltext&"where Product_Name like'%"&""&"%'"
end if
if request("Product_Class")<>"" then
sqltext=sqltext&"and Class_1 like '%"+request("Product_Class")+"%'"
end if
rs.open sqltext,conn,1,1
dim MaxPerpage
MaxPerPage=9
dim text,checkpage
text="0123456789"
Rs.Pagesize=MaxPerpage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next
if checkpage<>0 then
if not Isempty(request("page"))then
CurrentPage=Cint(request("page"))
if CurrentPage<1 then CurrentPage=1
if CurrentPage>Rs.PageCount then CurrentPage=Rs.PageCount
else
CurrentPage=1
end if
%>
<script>
function openbag(id)
{windows.open("eshop.asp?cpbm="+id,"","height=200,width=700,left=190,top=0,reszable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");}
</script>
<%
if rs.eof and rs.bof then
response.Write"<td><p align='center'><font color='#ff0000'>没有符合条件的cd</font></p></td>"
response.end
end if
%>
<%
row_count=1
Sub list()
%>
<% i=0
Do While Not Rs.Eof
%>
<tr>
<td width="16%" align="center" height="28" bgcolor="#CCCCCC">
<%=rs("Product_Id")%>
</td>
<td width="34%" align="center" height="28" bgcolor="#CCCCCC">
<%=rs("Product_Name")%>
</td>
<td width="18%" align="center" height="28" bgcolor="#CCCCCC">
<%=rs("P_NewPrice")%>
</td>
<td width="17%" align="center" height="28" bgcolor="#CCCCCC">
<a href="spjj.asp?ProductNO=<%=rs("Product_No")%>">详细资料</a>
</td>
<td width="15%" align="center" height="28" bgcolor="#CCCCCC">
<a href='javascript:openbag("<%=rs("Product_Id")%>)'><img style="cursor:hand " src="image/mybuy.gif" width="35" height="12" border="0" align="absmiddle"></a>
</td>
</tr>
<%
i=i+1
if i>=MaxPerpage then exit do
rs.MoveNext
loop
end Sub
end if
%>
</body>
</html>
2007-08-10 17:46
可见光
Rank: 1
等 级:新手上路
帖 子:143
专家分:0
注 册:2007-6-15
收藏
得分:0 

我一直没找到哪有问题!!谢谢yms123和QQQQQQQQQQQQQ

2007-08-10 22:22
可见光
Rank: 1
等 级:新手上路
帖 子:143
专家分:0
注 册:2007-6-15
收藏
得分:0 
回复:(可见光)[求助]怎么总是报错?

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<!--#include file="conn.asp"-->
<%
spxl=request("spxl")
set rs=server.CreateObject("adodb.recordset")
sqltest="select *from Product"
if request("Product_Name")<>"" then
sqltext=sqltext&"where Product_Name like'%"&request("Product_Name")&"%'"
else
sqltext=sqltext&"where Product_Name like'%"&""&"%'"
end if
if request("Product_Class")<>"" then
sqltext=sqltext&"and Class_1 like '%"&request("Product_Class")&"%'"
end if
rs.open sqltext,conn,1,1 '----出错处
dim MaxPerpage
MaxPerPage=9
dim text,checkpage
text="0123456789"
Rs.Pagesize=MaxPerpage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next
if checkpage<>0 then
if not Isempty(request("page"))then
CurrentPage=Cint(request("page"))
if CurrentPage<1 then CurrentPage=1
if CurrentPage>Rs.PageCount then CurrentPage=Rs.PageCount
else
CurrentPage=1
end if
if not Rs.eof then Rs.AbsolutePage=CurrentPage end if
else
CurrentPage=1
end if
%>
<script>
function openbag(id)
{windows.open("eshop.asp?cpbm="+id,"","height=200,width=700,left=190,top=0,reszable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");}
</script>
<%
if rs.eof and rs.bof then
response.Write"<td><p align='center'><font color='#ff0000'>没有符合条件的cd</font></p></td>"
response.end
end if
%>
<%
row_count=1
Sub list()
%>
<% i=0
Do While Not Rs.Eof
%>
<tr>
<td width="16%" align="center" height="28" bgcolor="#CCCCCC">
<%=rs("Product_Id")%>
</td>
<td width="34%" align="center" height="28" bgcolor="#CCCCCC">
<%=rs("Product_Name")%>
</td>
<td width="18%" align="center" height="28" bgcolor="#CCCCCC">
<%=rs("P_NewPrice")%>
</td>
<td width="17%" align="center" height="28" bgcolor="#CCCCCC">
<a href="spjj.asp?ProductNO=<%=rs("Product_No")%>">详细资料</a>
</td>
<td width="15%" align="center" height="28" bgcolor="#CCCCCC">
<a href='javascript:openbag("<%=rs("Product_Id")%>)'><img style="cursor:hand " src="image/mybuy.gif" width="35" height="12" border="0" align="absmiddle"></a>
</td>
</tr>
<%
i=i+1
if i>=MaxPerpage then exit do
rs.MoveNext
loop
end Sub
%>
</body>
</html>




因为初学,问题会多一些!请大家多多包涵.....

小弟还有一个问题就是
Microsoft JET Database Engine (0x80040E14)
无效的 SQL语句;期待 'DELETE'、'INSERT'、'PROCEDURE'、'SELECT'、或 'UPDATE'。
/spss.asp, 第 22 行
怎么我发的代码总是堆在一块啊

[此贴子已经被作者于2007-8-11 6:58:24编辑过]

2007-08-11 06:56
可见光
Rank: 1
等 级:新手上路
帖 子:143
专家分:0
注 册:2007-6-15
收藏
得分:0 

高手帮我分析下吧~!@@# 我在调试这个,进行不下去了

2007-08-11 10:47
可见光
Rank: 1
等 级:新手上路
帖 子:143
专家分:0
注 册:2007-6-15
收藏
得分:0 
madpbpl  谢谢啊 一定向大家好好学习 fighting
2007-08-11 11:24
快速回复:[求助]怎么总是报错?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012646 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved