暂无相关内容!
ADODB.Field 错误 '800a0bcd'BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。/product/product_show.asp,行 39代码如下:<% 
  dim p_id,brand,p_url,pic
  p_id=request("p_id")
  pic=request("pic")
  
  if pic = "" then
   pic = 1 
  end if 
  sql="select * from products where p_id="&p_id
  set rs=server.CreateObject("adodb.recordset")
  rs.open sql,conn,1,1
  if rs.recordcount=0 then
  response.Write("暂无相关内容!")
  end if
  brand = rs("brand")   此行为错误行
  
  if pic = 1 then   
   p_url = rs("p_picb")
  elseif pic = 2 then
    p_url = rs("p_picb_1")
  elseif pic = 3 then
    p_url = rs("p_picb_2")
  elseif pic = 4 then
    p_url = rs("p_picb_3")
  end if

  %>

解决方案 »

  1.   

     if rs.recordcount=0 then
      response.Write("暂无相关内容!")
      response.end
      end if
      

  2.   

    加上response.End后,页面执行到这里不往下执行了,
      

  3.   

    if rs.recordcount=0 then
      response.Write("暂无相关内容!")
    end if
    brand = rs("brand")   此行为错误行
      这句 brand = rs("brand")  不管 rs.recordcount 是否为0都会执行。
      

  4.   

    你的conn在哪里定义,设置连接串,和打开?
      

  5.   

    检查你的sql,能不能查询出数据
    sql="select * from products"行不行?