急求解答!ADODB.Recordset 错误 '800a0cb3' 当前记录集不支持书签。这可能是提供程序或选定的游标类型的限制。

qddoudouqd 2006-10-27 10:25:35
我的存储过程!
===================================
create procedure auction_pmh_show
@gs_id int
as
if @gs_id=0
begin
select * from auction_pmh,auction_gs where auction_gs.gs_id=auction_pmh.gs_id_pm
end
else
begin
select * from auction_pmh,auction_gs where auction_gs.gs_id=auction_pmh.gs_id_pm and auction_gs.gs_id=@gs_id
end


我的代码
================================
gs_id=request("gs_id")

if gs_id="" or gs_id=null then
gs_id=0
end if

set comd=server.createobject("adodb.command")
comd.commandtype=4
set comd.activeconnection=conn
comd.commandtext="auction_pmh_show" '(存储过程名)

comd.Parameters.Append comd.CreateParameter("@gs_id",adInteger,adParamInput)
comd("@gs_id")=gs_id

set rs1=server.createobject("adodb.recordset")
rs1.CursorType=3
rs1.open comd,,1,1
if not rs1.eof then
if request("page")<>"" then
page=cint(request("page"))
else
page=1
end if
if request("line")<>"" then
line=cint(request("line"))
else
line=20
end if

rs1.PageSize=line
rs1.AbsolutePage=page  '这句报错

======================================
我调了半天了,后来换了一个简单的存储过程,通过了,
高手们看看,是不是我的存储过程写的不对??我真晕了,为了这个都调了好几个小时了!
...全文
403 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
97jr 2006-11-28
  • 打赏
  • 举报
回复
增加rs.cursorlocation=3试试
qddoudouqd 2006-11-13
  • 打赏
  • 举报
回复
不好用啊
stou 2006-10-29
  • 打赏
  • 举报
回复
set @gs_id=0 先賦初值試下
qddoudouqd 2006-10-28
  • 打赏
  • 举报
回复
sql server 数据库
运行环境 win2003
liudianhalf 2006-10-28
  • 打赏
  • 举报
回复
用的什么数据库?
qddoudouqd 2006-10-27
  • 打赏
  • 举报
回复
gs_id=request("gs_id")

if gs_id="" or gs_id=null then
gs_id=0
end if


set rs1=server.createobject("adodb.recordset")

if gs_id=0 then
sql="select * from auction_pmh,auction_gs where auction_gs.gs_id=auction_pmh.gs_id_pm"
else
sql="select * from auction_pmh,auction_gs where auction_gs.gs_id=auction_pmh.gs_id_pm and auction_gs.gs_id="&gs_id&""
end if
rs1.open sql,conn,1,1

我不用存储过程,直接把sql写到页面上来,就是正确滴了

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧