ADODB.Recordset 错误 '800a0cb3' ?急,在线等...

QCB181 2004-04-30 04:03:32
Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

ADODB.Recordset 错误 '800a0cb3'

当前记录集不支持书签。这可能是提供程序或选定的游标类型的限制。

/b2bnet/commerce/info_list.asp,行35

第35行是这样的
rs.AbsolutePage = PageNo

请问高手这是什么原因,有什么办法可以解决这个问题?
...全文
79 12 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
nssp 2004-04-30
  • 打赏
  • 举报
回复
另外,数据表中需要有一个主键(Primary Key)
nssp 2004-04-30
  • 打赏
  • 举报
回复
rs.open strsql,conn,1,3

把第四个参数设为3即可
zhenze 2004-04-30
  • 打赏
  • 举报
回复
conn.CursorLocation=3
angelheavens 2004-04-30
  • 打赏
  • 举报
回复
1)保证存储过程有效;
2)
rs.open "ptInfo "&I_type&","&typeid&","&sortid&","&selcectWhich&"",conn,1,1,4
lanechng 2004-04-30
  • 打赏
  • 举报
回复
存储过程好像不要改,在打开记录集的时候把游标类型改成
键集或动态的就应该可以了(对此不熟,仅供参考)
歪歪 2004-04-30
  • 打赏
  • 举报
回复
存储过程不熟

帮你

up
QCB181 2004-04-30
  • 打赏
  • 举报
回复
谁能帮我改一下这个存储过程:
CREATE PROCEDURE ptInfo
@intInfoType int,
@intInfoTypeID int,
@intInfoSortID int,
@intSelectWhich int
AS
case @intSelectWhich
when 1 then
select * from info,company where info.gsid=company.id and info.I_Type=@intInfoType
when 2 then
select * from info,company where info.gsid=company.id and info.I_Type=@intInfoType and info.DateAndTime=getdate()
when 3 then
select * from info,company where info.gsid=company.id and company.typeid=@intInfoTypeID
when 4 then
select * from info,company where info.gsid=company.id and company.sortid=@intInfoSortID
end
GO
QCB181 2004-04-30
  • 打赏
  • 举报
回复
好象是存储过程的问题,谁能帮我改进一下存储过程,小弟在这里多谢了!
QCB181 2004-04-30
  • 打赏
  • 举报
回复
我写的是存储过程来着的
ycl111 2004-04-30
  • 打赏
  • 举报
回复
rs.open "execute ptInfo "&I_type&","&typeid&","&sortid&","&selcectWhich&"",conn,1,1
一句不太对,
应该是sql语句才对吧,象select *from 什么的。
QCB181 2004-04-30
  • 打赏
  • 举报
回复
存储过程如下:

CREATE PROCEDURE ptInfo
@intInfoType int,
@intInfoTypeID int,
@intInfoSortID int,
@intSelectWhich int
AS
if @intSelectWhich=1 select * from info,company where info.gsid=company.id and info.I_Type=@intInfoType
if @intSelectWhich= 2 select * from info,company where info.gsid=company.id and info.I_Type=@intInfoType and info.DateAndTime=getdate()
if @intSelectWhich= 3 select * from info,company where info.gsid=company.id and company.typeid=@intInfoTypeID
if @intSelectWhich= 4 select * from info,company where info.gsid=company.id and company.sortid=@intInfoSortID
GO
QCB181 2004-04-30
  • 打赏
  • 举报
回复
整个分页代码如下:

<%
const PgSz=6 '设定开关,指定每一页所显示的帖子数目,默认为10帖一页
dim rs,sql '实例
dim Total '总记录数
dim PageNo '当前页
dim TotalPage '总页数
dim position,pagebegin,pagend,RowCount 'position:判断位置;pagebegin:数据起始位置;pagend:数据结束位置;RowCount:每页最多显示个数
const showline=2 '每页每行显示的数目
const showrow=10 '每页显示的行数
'dim PgSz '每页显示的个数
'PgSz=showline*showrow
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open "execute ptInfo "&I_type&","&typeid&","&sortid&","&selcectWhich&"",conn,1,1
PageNo=Request("pageno")
if PageNo="" Then
PageNo = 1
else
PageNo=PageNo+1
PageNo=PageNo-1
end if

if PageNo < 1 Then
PageNo = 1
end if
If rs.RecordCount=0 then
response.write "<P><center>对不起,暂时还没有相关信息!</center></P>"
TotalPage=1
else
Total=rs.RecordCount
rs.PageSize = Cint(PgSz)
TotalPage=INT(rs.recordcount / PgSz * -1)*-1

response.write "PageNo="&PageNo&""
rs.AbsolutePage = PageNo
position=rs.PageSize*PageNo
pagebegin=position-rs.PageSize+1

if position < Total then
pagend=position
else
pagend= Total
end if
end if
'Response.Write "<P align='center'><B>数据库查询结果:</B>"

'Response.Write "(共有"&Total &"条符合条件的信息,总"&TotalPage&"页,显示第"&PageNo&"页 显示"&pagebegin&"-"&pagend&")</p>"


%>
<table width="350" border="0" align="center" cellpadding="0" cellspacing="0">
<%
dim showname
dim i
i=1
RowCount = rs.PageSize
do while not rs.eof and RowCount>0

%>
<%if i=1 then bg="#B7C1CA" else bg="#FFFFFF" end if%> <tr bgcolor=<%=bg%>><td>
<table width="350" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50">[<%= InfoType %>]</td>
<td width="300"><a href="business_info.asp?info_id=<%=rs("info_id")%>"><%= rs("showname") %></A></td>
</tr>
<tr>
<td> </td>
<td><%= rs("qymc") %><%= rs("city") %></td>
</tr>
<tr>
<td> </td>
<td><%=mid(rs("I_content"),1,100)%>..[<a href="business_info.asp?info_id=<%=rs("info_id")%>">详细信息</a>]</td>
</tr>
</table>
</td></tr>
<%
RowCount=RowCount-1
i=1-i
rs.movenext
loop
%>
<tr>
<td align="right" colspan="<%= showline %>">页次:<%=PageNo%>/<%=TotalPage%> 共<%=Total%>条信息
<%
if PageNo<>1 then
response.write "[<b>"+"<a href='search.asp?PageNo=1'>首页</a></b>] "
response.write "[<b>"+"<a href='search.asp?PageNo="&cint(PageNo-1)&"'>上一页</a></b>] "
else
Response.Write "[首页] [上一页]"
end if
if PageNo<>TotalPage then
response.write "[<b>"+"<a href='search.asp?PageNo="&cint(PageNo+1)&"'>下一页</a></b>] "
response.write "[<b>"+"<a href='search.asp?PageNo="&cint(TotalPage)&"'>尾页</a></b>] "
else
Response.Write "[下一页] [尾页]"
end if
%>
</td>
</tr>
</table>
<%
rs.close
set rs=nothing
%>

28,409

社区成员

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

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