| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 589 人关注过本帖
标题:小弟下学ASP,请教大家一个问题,希望大家能帮帮我
只看楼主 加入收藏
bestnet
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2005-12-14
收藏
 问题点数:0 回复次数:3 
小弟下学ASP,请教大家一个问题,希望大家能帮帮我

Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

ADODB.Recordset 错误 '800a0bcd'

BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。

/shop_18193/shangping_j.asp,行74

搜索更多相关主题的帖子: ASP 下学 
2005-12-14 09:31
bestnet
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2005-12-14
收藏
得分:0 

<%set rs=server.createobject("adodb.recordset")

if leixing="big" then
rs.open "select * from shop_books where anclassid="&anclassid&" order by adddate desc",conn,1,1
elseif leixing="small" then
rs.open "select * from shop_books where anclassid="&anclassid&" and nclassid="&nclassid&" order by adddate desc",conn,1,1
elseif leixing="tejia" then
rs.open "select * from shop_books where tejiabook=1 order by adddate desc",conn,1,1
elseif leixing="news" then
rs.open "select * from shop_books where newsbook=1 order by adddate desc",conn,1,1
else
rs.open "select * from shop_books where newsbook=1 order by adddate desc",conn,1,1
end if
if rs.recordcount=0 then

%>
<table width="370" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td align=center>暂无商品</td>
</tr>
</table>
<%
else

rs.PageSize =10 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")

if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if

if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if

rs.AbsolutePage=Page

if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if



for i=1 to x

%>
<!-----------内容--------------->
<!-- #include file="shangping_j.asp"-->

<%
rs.movenext
if not rs.eof then
response.write "<br>"
end if
loop
next
call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
end if
rs.close
set rs=nothing %>

<%
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
Dim query, a, x, temp
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")

query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If


Next

Response.Write("<table " & Table_style & ">" & vbCrLf )
Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
Response.Write("<TD align=right>" & vbCrLf )
Response.Write(font_style & vbCrLf )

if page<=1 then
Response.Write ("首页 " & vbCrLf)
Response.Write ("上页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上页</A> " & vbCrLf)
end if

if page>=pagecount then
Response.Write ("下页 " & vbCrLf)
Response.Write ("尾页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾页</A> " & vbCrLf)
end if

Response.Write(" 页次:" & page & "/" & pageCount & "页" & vbCrLf)
Response.Write(" 共有" & iCount & "种商品" & vbCrLf)
Response.Write(" 转到" & "<INPUT TYEP=TEXT NAME=page SIZE=1 Maxlength=5 VALUE=" & page & ">" & "页" & vbCrLf & "<INPUT type=submit style=""font-size: 9pt"" value=GO class=b2>")
Response.Write("</TD>" & vbCrLf )
Response.Write("</TR></form>" & vbCrLf )
Response.Write("</table>" & vbCrLf )
End Sub
%>

2005-12-14 09:31
bestnet
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2005-12-14
收藏
得分:0 

这是<!-- #include file="shangping_j.asp"-->

====================
<%do while not rs.eof %>
<table width="513" border="1">
<%do while not rs.eof %>
<tr>

<%
for iii=1 to 3
if not rs.eof then
%>

<td> <table width="27%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
<td rowspan="5" width="88"> <div align="center">
<%if rs("bookpic")="" then
response.write "<div align=center><a href=list.asp?id="&rs("bookid")&" target=_blank><img src=images/emptybook.gif width=75 height=75 border=0></a></div>"
else%>
<a href=list.asp?id=<%=rs("bookid")%> target=_blank><img src="<%=trim(rs("bookpic"))%>" width=75 border=1 height="75"></a>
<%end if%>
</div></td>
<td width="870"><a href=list.asp?id=<%=rs("bookid")%> target=_blank><font color="#990000"><%=trim(rs("bookname"))%></font></a></td>
</tr>
<tr>
<td>&#30011;&#23478;&#65306; <%set rs2=server.createobject("adodb.recordset")
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from shop_nclass where nclassid="&rs("nclassid"),conn,1,1
if rs2.recordcount>0 then
response.write "<a href=class.asp?lx=small&anid="&rs2("anclassid")&"&nid="&rs2("nclassid")&" targer=_blank>"&rs2("nclass")
end if
rs2.close
set rs2=nothing%></td>
</tr>
<tr>
<td><%=rs("isbn1")%>:<%=rs("isbn")%> </td>
</tr>
<tr>
<td width="870"> &#20215;&#26684;&#65306;<font color=red><%=trim(rs("vipjia"))%></font>&#20803;</td>
</tr>
<tr>
<td width="870"><a href="javascript:demo('gouwu.asp?id=<%=rs("bookid")%>&action=add');"><img src="images/goumai.gif" width="43" height="12" border=0></a>&nbsp;&nbsp;<a href="javascript:;" onClick="javascript:window.open('shoucang.asp?id=<%=rs("bookid")%>&action=add','shouchang','width=450,height=350,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');"><img src="images/shoucang1.gif" width="49" height="13" border=0></a></td>
</tr>
<tr>
<td colspan="2" height=1 background="images/bj_x1.gif"></td>
</tr>
</table>
<!-----------内容--------------->
</td>
<%
else
%>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<TD align=center height=49 valign=middle><font color=red>无产品</font></td>
</tr>
</Table>
</td>
<%
end if
rs.movenext
next
loop
%>
</tr>
</table>

2005-12-14 09:32
bestnet
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2005-12-14
收藏
得分:0 
自己已解决了
2005-12-14 10:07
快速回复:小弟下学ASP,请教大家一个问题,希望大家能帮帮我
数据加载中...
 
   



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

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