[求助]BOF 或 EOF 中有一个是“真”
错误类型:ADODB.Field (0x80020009)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
代码如下:
<%
id =request.QueryString("id")
set rs=server.createobject("adodb.recordset")
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 zhaoshang where id="&id
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
<tr>
<td width="980" height="20" valign="middle">
<div align="center" class="text"><font color="#FF0000" size="3">暂时没有招商信息!</font></div> </td>
</tr>
<%
response.end
else
rs.pagesize=9
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
i=0
dim zhaoshang_id(),yaopinmingcheng(),shangbiaoming(),zhaoshangquyu(),yaopinleibie(),pizhunwenhao(),shengchandanwei(),jixing(),gunge(),chengfen(),yongfayongliang(),chanpinxingneng(),chanpingbuchongsm(),dailiyaoqiu(),beizhu(),danweimingcheng(),dianhua(),chuanzhen(),shouji(),lianxiren(),wangzhi(),email(),youbian(),dizhi(),tupian()
do while not rs.eof and (i<rs.pagesize)
i=i+1
redim preserve zhaoshang_id(i), yaopinmingcheng(i),shangbiaoming(i),zhaoshangquyu(i),yaopinleibie(i),pizhunwenhao(i),shengchandanwei(i),jixing(i),gunge(i),chengfen(i),yongfayongliang(i),chanpinxingneng(i),chanpingbuchongsm(i),dailiyaoqiu(i),beizhu(i),danweimingcheng(i),dianhua(i),chuanzhen(i),shouji(i),lianxiren(i),wangzhi(i),email(i),youbian(i),dizhi(i),tupian(i)
zhaoshang_id(i)=rs("id")
yaopinmingcheng(i)=rs("yaopinmingcheng")
shangbiaoming(i)=rs("shangbiaoming")
zhaoshangquyu(i)=rs("zhaoshangquyu")
yaopinleibie(i)=rs("yaopinleibie")
pizhunwenhao(i)=rs("pizhunwenhao")
shengchandanwei(i)=rs("shengchandanwei")
jixing(i)=rs("jixing")
gunge(i)=rs("gunge")
chengfen(i)=rs("chengfen")
yongfayongliang(i)=rs("yongfayongliang")
chanpinxingneng(i)=rs("chanpinxingneng")
chanpingbuchongsm(i)=rs("chanpingbuchongsm")
dailiyaoqiu(i)=rs("dailiyaoqiu")
beizhu(i)=rs("beizhu")
danweimingcheng(i)=rs("danweimingcheng")
dianhua(i)=rs("dianhua")
chuanzhen(i)=rs("chuanzhen")
shouji(i)=rs("shouji")
lianxiren(i)=rs("lianxiren")
wangzhi(i)=rs("wangzhi")
email(i)=rs("email")
youbian(i)=rs("youbian")
dizhi(i)=rs("dizhi")
tupian(i)=rs("tupian")
rs.movenext
loop
end if
%>