ADODB.Recordset 错误 '800a0e7d' ,怎么解决呢?

jhlgxyxl 2003-11-30 07:36:33
dim name,arrName,tmpname,idArr
set ros1=server.CreateObject("adodb.recordset")
set ros3=server.CreateObject("adodb.recordset")
ros1.open "select top "&cc&" enter_name,name3=dbo.f_merg(m_id,2),m_id from member_list where ischecked='Y' order by last_logtime desc",con,1,3
if ros1.eof then
getEn=""
else
do until ros1.eof
name=ros1("name3")
arrName=split(name,"|")
for i=0 to ubound(arrName)
posArr=instr(1,""&arrName(i)&"","*")
if posArr>1 then
idArr=mid(""&arrName(i)&"",1,posArr-1)
nameArr=mid(""&arrName(i)&"",posArr+1)
ros3.open "select tc1_id,tc2_id from trade_class3 where nameArr="&name3&""
tc1_id=ros3("tc1_id")
tc2_id=ros3("tc2_id")
tmpname=tmpname&i+1&".  <a href='chanp_list.asp?tc1_id="&ros3("tc1_id")&"tc2_id="&ros3("tc2_id")&"'>"&nameArr&"</a>  "
end if
ros3.movenext
next
temp_s=temp_s&"<a href='huiyuan.asp?m_id="&ros1("m_id")&"'><br>"&ros1("enter_name")&"<br></a>"&tmpname&"<br>"
ros1.movenext
tmpname=""
loop
getEn=temp_s
end if
ros3.close
set ros3=nothing
ros1.close
set ros1=nothing
...全文
126 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
DeltaCat 2003-11-30
  • 打赏
  • 举报
回复
dim name,arrName,tmpname,idArr
set ros1=server.CreateObject("adodb.recordset")
set ros3=server.CreateObject("adodb.recordset")
ros1.open "select top "&cc&" enter_name,name3=dbo.f_merg(m_id,2),m_id from member_list where ischecked='Y' order by last_logtime desc",con,1,3
if ros1.eof then
getEn=""
else
do until ros1.eof
name=ros1("name3")
arrName=split(name,"|")
for i=0 to ubound(arrName)
posArr=instr(1,""&arrName(i)&"","*")
if posArr>1 then
idArr=mid(""&arrName(i)&"",1,posArr-1)
nameArr=mid(""&arrName(i)&"",posArr+1)
ros3.open "select tc1_id,tc2_id from trade_class3 where nameArr="&name3&""
tc1_id=ros3("tc1_id")
tc2_id=ros3("tc2_id")
tmpname=tmpname&i+1&".  <a href='chanp_list.asp?tc1_id="&ros3("tc1_id")&"tc2_id="&ros3("tc2_id")&"'>"&nameArr&"</a>  "
end if
ros3.movenext
next

ros3.close


temp_s=temp_s&"<a href='huiyuan.asp?m_id="&ros1("m_id")&"'><br>"&ros1("enter_name")&"<br></a>"&tmpname&"<br>"
ros1.movenext
tmpname=""
loop
getEn=temp_s
end if
set ros3=nothing
ros1.close
set ros1=nothing

有空的地方加了一句
starboy1413 2003-11-30
  • 打赏
  • 举报
回复
ros3.open sql,conn,3,3

这样~~~~~~~~~~~
nchen123 2003-11-30
  • 打赏
  • 举报
回复
你的 ros3 已经在上面打开另一个记录集了, 没有释放不能再用。 换一个记录集
我没有细看你的代码,不管怎么说记录集, 数据库连接记得要随用随释放。

// ------------------
// Archimond 阿克蒙德
jhlgxyxl 2003-11-30
  • 打赏
  • 举报
回复
不好意思呀,这是我拷贝的时候出了点小差,本来是有的。
他提示出的错误是:
ADODB.Recordset 错误 '800a0e79'
对象打开时,不允许操作。
出错行还是
ros3.open "select tc1_id,tc2_id from trade_class3 where nameArr="&name3&"",con,1,3

DeltaCat 2003-11-30
  • 打赏
  • 举报
回复
ros3.open "select tc1_id,tc2_id from trade_class3 where nameArr="&name3&"",con

你的数据库连接都漏了,老兄
jhlgxyxl 2003-11-30
  • 打赏
  • 举报
回复
当前台页面调用此子程序时,出现如下错误的提示:

ADODB.Recordset 错误 '800a0e7d'
连接无法用于执行此操作。在此上下文中它可能已被关闭或无效。
/func.asp,行241(即为:ros3.open "select tc1_id,tc2_id from trade_class3 where nameArr="&name3&"")
请高手出招,谢谢!

28,407

社区成员

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

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