您的位置:程序门 -> web 开发 -> asp



帮忙看看这个错误,谢谢


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


帮忙看看这个错误,谢谢[已结贴,结贴人:feng7605]
发表于:2008-01-18 18:04:03 楼主
是购物车,计算总额
错误   '80020009'  

代码如下:
<%
shop.open   "select   sum(paid)   as   paid,sum(score)   as   score   from   orders   where   goods='"&trim(rs("goods"))&"'   ",conn,1,1
set   rs2=server.createobject("adodb.recordset")
rs2.open   "select   *   from   delivery   where   deliveryid="&rs("deliverymethord"),conn,1,1
  ‘把这行删掉能运行
response.write   " <font   color=#ff6600> "&shop("paid")+rs2("fee")&"元 </font> "   rs2.close
shop.close
set   shop=nothing
%>
发表于:2008-01-18 18:38:531楼 得分:4
你加一句   判断   记录集不为空的判断
然后在运行response.write    
发表于:2008-01-18 19:16:332楼 得分:4
shop("paid")+rs2("fee")==>
formatnumber(shop("paid"))+formatnumber(rs2("fee"))
发表于:2008-01-18 19:31:143楼 得分:2
(0x80020009)---当前rs指针所指向记录的字段值为null,不能使用
发表于:2008-01-19 10:04:324楼 得分:10
<%  
shop.open       "select       sum(paid)       as       paid,sum(score)       as       score       from       orders       where       goods='"&trim(rs("goods"))&"'       ",conn,1,1  
set       rs2=server.createobject("adodb.recordset")  
rs2.open       "select       *       from       delivery       where       deliveryid="&rs("deliverymethord"),conn,1,1  

if   not   rs.eof   and   not   rs.bof   then
        response.write       "   <font       color=#ff6600>   "&shop("paid")+rs2("fee")&"元   </font>   "      
end   if

rs2.close  
shop.close  
set       shop=nothing  
%>  
发表于:2008-01-19 10:34:105楼 得分:0
谢谢。问题已解决


快速检索

最新资讯
热门点击