帮忙啊,大侠们

wj0 wj0 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我在做购物系统的时候,涉及到了分页技术

此程序再ASP+ACCESS通过
但是数据库该换为 SQL SERVER 出现错误
出现错误

错误类型:
ADODB.Recordset (0x800A0BB9)
/xysc/sort.asp, 第 44 行

请教大侠


代码如下
<%sort_id=trim(request("sort_id"))
if sort_id=empty then
response.redirect "index.asp"
end if

page=request.querystring("page")
if page="" then page=1
if not(isnumeric(page)) then page=1
if page<1 then page=1
page=int(page)

sql="select * from hw where sort_id='"&sort_id&"' order by hw_id DESC"
rs.open sql,conn,3,3
if rs.eof then
response.write "你所选的类别没有商品"
response.end
else
rs.pagesize=12
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page /*44行*/
rs.cachesize=rs.pagesize
i=0
dim hw_id(),hw_name(),hw_cash(),hw_views(),hw_buys(),hw_content(),hw_pic(),hw_date()
do while not rs.eof and (i<rs.pagesize)
i=i+1
redim preserve hw_id(i),hw_name(i),hw_cash(i),hw_views(i),hw_buys(i),hw_content(i),hw_pic(i),hw_date(i)
hw_id(i)=rs("hw_id")
hw_name(i)=rs("hw_name")
hw_cash(i)=rs("hw_cash")
hw_views(i)=rs("hw_views")
hw_buys(i)=rs("hw_buys")
hw_content(i)=rs("hw_content")
hw_pic(i)=rs("hw_pic")
hw_date(i)=rs("hw_date")
rs.movenext
loop
end if
rs.close
%>
...全文
评论 1
收藏 已收藏
分享
返回顶部
wj0
ASP 28,400 成员 356,938 内容