错误类型:(0x80020009)发生意外。帮帮忙,谢谢!

来源:百度知道 编辑:UC知道 时间:2024/07/07 10:33:51
<br />
<%
set rs=server.CreateObject("ADODB.Recordset")
rs.open "select * from product where sort_id='"&bclassname&"' order by id DESC",conn,1,3
if not rs.eof and not rs.bof then
i=1%>
<div align="center">
<table width="55%" border="0" class="content">
<tr>
<%do while not rs.eof
if i=4 then
i=1%><tr><%end if%>
<td valign="top"><table width="224" border="0" cellpadding="3" cellspacing="5">
<tr>
<td width="208" height="171" background="images/bg2.gif"><img src="pic/<%=rs("pic")%>" width="200" height="165" /></td>
<br />

这是溢出错误. 估计你是想把这段代码重复执行四次.
修改处一:
<%
set rs=server.CreateObject("ADODB.Recordset")
rs.open "select * from product where sort_id='"&bclassname&"' order by id DESC",conn,1,3
if not rs.eof and not rs.bof then
i=1%>
这处的i=1删除

修改处二:
<%
i=1
do while not rs.eof
if i<4 then
%>

这样应该可以了.

------------------------------------------
f id="" then id=1
rs.Open "select * from class where sort_id="&id ,conn,1,1
if rs("sort_id")=""then response.redirect "productsX.asp"(这行发生意外错误)
bclassname=rs("sort_id")

这里面加上ELSE条件

什么东东啊?

编译器漏洞,无法修正,建议重写不同的代码