总是提示:Operation is not allowed when the object is closed

cyoandjj 2004-10-24 06:01:37
原语句:<% dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="select * from query1 "
rs.open sql,hgsconn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>没有数据</p>"
else
do while not rs.eof
rs.movenext
loop
end if
rs.close
%>

总是提示:Operation is not allowed when the object is closed
怎么解决?
...全文
127 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
是是非非 2004-10-24
  • 打赏
  • 举报
回复
>> 数据库连接没有问题

这么肯定?
cyoandjj 2004-10-24
  • 打赏
  • 举报
回复
数据库连接没有问题
DeltaCat 2004-10-24
  • 打赏
  • 举报
回复
数据库连接的部分呢?
777dragon 2004-10-24
  • 打赏
  • 举报
回复
创建数据库连接对象那点怎么写的?
cyoandjj 2004-10-24
  • 打赏
  • 举报
回复
我也知道OBJECT IS CLOSE ,代码也没有错,但就是不能查询出来!
777dragon 2004-10-24
  • 打赏
  • 举报
回复
object is closed嘛~

代码好象没错(虽然没什么意义^_^)

cyoandjj 2004-10-24
  • 打赏
  • 举报
回复
up

28,390

社区成员

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

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