| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1488 人关注过本帖
标题:求助:急~~做了一个购物的会员注册系统有点问题,希望各位大虾帮帮忙啊
只看楼主 加入收藏
lhfjnl
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-5-18
收藏
 问题点数:0 回复次数:10 
求助:急~~做了一个购物的会员注册系统有点问题,希望各位大虾帮帮忙啊
做了个会员注册系统,在没登陆之前商品展示那些都好好的,但只要一登陆进去,点击商品图片,list.asp就出现问题了:错误类型:ADODB.Recordset(0x800A0BB9)参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。/ishop/list.asp, 第 102 行
这是我的list.asp文件部分代码:
<body>
<table width="972" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center">
    <%if IsNumeric(request.QueryString("id"))=False then
         response.write("<script>alert(""错误访问!"");location.href=""index.asp"";</script>")
         response.end
      end if
      dim id
      id=request.QueryString("id")
      if not isinteger(id) then
         response.write"<script>alert(""错误访问!"");location.href=""index.asp"";</script>"
    end if%>
   <% dim shopid,action
      shopid=request.QueryString("id")
      action=request.QueryString("action")
      if action="save" then
         set rs=server.CreateObject("adodb.recordset")
         rs.open "select * from shop_pinglun",conn,1,3
         rs.addnew
         rs("shopid")=shopid
         rs("pingji")=request("pingji")
         rs("pinglunname")=HTMLEncode(trim(request("pinglunname")))
         rs("pingluntitle")=HTMLEncode(trim(request("pingluntitle")))
         rs("pingluncontent")=HTMLEncode(trim(request("pingluncontent")))
         rs("ip")=Request.servervariables("REMOTE_ADDR")
         rs("pinglundate")=now()
         rs("shenhe")=0
         rs.update
         rs.close
         set rs=nothing
         set rs=server.CreateObject("adodb.recordset")
         rs.open "select * from shop_books where shopid="&shopid,conn,1,3
         rs("pingji")=cint(rs("pingji"))+1
         rs("zongpingji")=cint(rs("zongpingji"))+request("pingji")
         rs.update
         rs.close
         set rs=nothing
         response.Write "<script language=javascript>alert('您的评论已成功提交!');history.go(-1);</script>"
         response.End
         end if
       %>
    <!--#include file="webtop2.asp"--></td>
  </tr>
  <tr>
    <td align="center"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
      
        <td width="986"><table width="100%"  border="1" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="table-zuoyou" bordercolor="#CCCCCC">
          <tr>
            <td width="215" valign="top" bgcolor="#FFFFFF" >
              <!--#include file="history.asp"-->
              <!--#include file="gouwucheinfo.asp"-->
              <table>
              <tr>
               <td width="213" bgcolor="#f1f1f1" height="38" align="center"><strong><font color="#000073">奥运网站链接</font></strong></td>
              </tr>
              <tr>
              <td> <!--#include file="service.asp"--></td>
              </tr>
              </table>
              </td>
            <td width="770" align="center" valign="top"  >
            <% set rs=server.createobject("adodb.recordset")
              rs.open "select * from shop_books where shopid="&request("id"),conn,1,3
              if rs.recordcount=0 then
            %>
            <font color="#000073">商品已不存在</font>
            <%
             else
             rs("liulancount")=rs("liulancount")+1
             rs.update
             if request.Cookies("bjx")("username")<>"" then
             set rs_s=server.CreateObject("adodb.recordset")
             rs_s.open "select * from [user] where username='"&request.Cookies("bjx")("username")&"'",conn,1,1
             t_userid=rs_s("userid")
             rs_s.close
             set rs_s=server.createobject("adodb.recordset")
             rs_s.open "select * from shop_his where shopid="&request("id")&" and username='"&request.Cookies("bjx")("username")&"' and lx=1",conn,2,3
             if rs_s.recordcount>0 then
             rs_s("ltime")=now()
             rs_s("userid")=t_userid
             rs_s.update
             rs_s.close
             set rs_s=nothing
             else
                rs_s.close
                set rs_s=server.createobject("adodb.recordset")
                rs_s.open "select * from shop_his where username='"&request.Cookies("bjx")("username")&"' and lx=1 order by ltime",conn,1,3
                if rs_s.recordcount>=4 then
                    rs_s.delete
                    rs_s.update
                end if      (106行)
                rs_s.addnew(107行)
                   rs_s("username")=request.Cookies("bjx")("username")
                   rs_s("shopid")=request("id")
                    rs_s("shopname")=rs("shopname")
                    rs_s("userid")=t_userid
                    rs_s("lx")=1
                    rs_s("ltime")=now()
                    rs_s.update
                    rs_s.close
                    set rs_s=nothing
                    end if
                    end if
            %>
做毕业设计有点急,这问题困扰了好久,帮帮忙,谢谢了 ~~~我的QQ:393072660
搜索更多相关主题的帖子: 系统 会员 购物 
2008-05-18 16:13
tianyu123
Rank: 1
等 级:新手上路
威 望:2
帖 子:576
专家分:0
注 册:2007-8-26
收藏
得分:0 
102行是哪行?

改变一切,须从改变观念开始!
2008-05-18 17:35
lhfjnl
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-5-18
收藏
得分:0 
回复 1# 的帖子
怎么都没人回那~~~,还说明一个要是会员注销退出了,就又变好了
2008-05-18 17:36
lhfjnl
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-5-18
收藏
得分:0 
回复 2# 的帖子
刚还在说怎么没人回,就有人看了哈哈,错误类型:
ADODB.Recordset (0x800A0CB3)
当前记录集不支持更新。这可能是提供程序的限制,也可能是选定锁定类型的限制。
/ishop/list.asp, 第 107 行
<%
             else
             rs("liulancount")=rs("liulancount")+1
             rs.update
             if request.Cookies("bjx")("username")<>"" then
             set rs_s=server.CreateObject("adodb.recordset")
             rs_s.open "select * from [user] where username='"&request.Cookies("bjx")("username")&"'",conn,1,1
             t_userid=rs_s("userid")
             rs_s.close
             set rs_s=server.createobject("adodb.recordset")
             rs_s.open "select * from shop_his where shopid="&request("id")&" and username='"&request.Cookies("bjx")("username")&"' and lx=1",conn,2,3
             if rs_s.recordcount>0 then
             rs_s("ltime")=now()
             rs_s("userid")=t_userid
             rs_s.update
             rs_s.close
             set rs_s=nothing
             else
                rs_s.close
                set rs_s=server.createobject("adodb.recordset")
                rs_s.open "select * from shop_his where username='"&request.Cookies("bjx")("username")&"' and lx=1 order by ltime",conn,1,3
                if rs_s.recordcount>=4 then
                    rs_s.delete
                    rs_s.update
                end if
第107行                rs_s.addnew
                   rs_s("username")=request.Cookies("bjx")("username")
                   rs_s("shopid")=request("id")
                    rs_s("shopname")=rs("shopname")
                    rs_s("userid")=t_userid
                    rs_s("lx")=1
                    rs_s("ltime")=now()
                    rs_s.update
                    rs_s.close
                    set rs_s=nothing
                    end if
                    end if
            %>
2008-05-18 17:37
tianyu123
Rank: 1
等 级:新手上路
威 望:2
帖 子:576
专家分:0
注 册:2007-8-26
收藏
得分:0 
请注明错误的行具体是哪行!
107行具体是哪行?

改变一切,须从改变观念开始!
2008-05-18 17:44
lhfjnl
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-5-18
收藏
得分:0 
回复 5# 的帖子
第107行                rs_s.addnew,  代码旁边有标107行
2008-05-18 18:13
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
rs_s.close
                set rs_s=server.createobject("adodb.recordset")
                rs_s.open "select * from shop_his where username='"&request.Cookies("bjx")("username")&"' and lx=1 order by ltime",conn,1,3
从这里看不出记录集为什么不支持更新,那就有可能是数据库的问题,楼主用的是什么数据库。
2008-05-18 18:27
tianyu123
Rank: 1
等 级:新手上路
威 望:2
帖 子:576
专家分:0
注 册:2007-8-26
收藏
得分:0 
这样试试 加入红色代码
if rs_s.recordcount>=4 then
   rs_s.delete
   rs_s.update
end if
rs_s.close
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from shop_his",conn,1,3

rs_s.addnew
收到的鲜花
  • lhfjnl2008-05-18 20:44 送鲜花  2朵  

改变一切,须从改变观念开始!
2008-05-18 18:28
lhfjnl
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-5-18
收藏
得分:0 
回复 7# 的帖子
SQL数据库啊,就只要会员一登陆进去就有问题,但退出来的话  什么都好好的,会不会和COOKIES有关系啊
2008-05-18 20:34
lhfjnl
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-5-18
收藏
得分:0 
回复 8# 的帖子
非常感谢你哈  真的可以了啊  谢谢~~~
2008-05-18 20:39
快速回复:求助:急~~做了一个购物的会员注册系统有点问题,希望各位大虾帮帮忙啊 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013881 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved