存儲過程中的問題

soaringzhang 2004-08-03 08:47:57
表结构如下: tree_eqs(id,parentid,content) 树结构
存储过程如下
CREATE PROCEDURE test12
@node int
AS
TRUNCATE TABLE tree_eqs_temp
declare @depth int
set @depth = 1
insert into tree_eqs_temp select *, @depth from tree_eqs Where parentid = @node
while @@ROWCOUNT > 0
begin
set @depth = @depth + 1

insert into tree_eqs_temp
select *, @depth
from tree_eqs Where Parentid in (select id from tree_eqs_temp WHERE depth=@depth-1)
end
begin
select id from tree_eqs_temp
end
GO
目地:显示指定节点下树中所有节点值
在asp执行中出现
• 错误类型:
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
/deeptree/goto.asp, line 18
不知如何解决
...全文
71 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
soaringzhang 2004-08-03
  • 打赏
  • 举报
回复
不行呀!
fhsoft8508539 2004-08-03
  • 打赏
  • 举报
回复
去检查你的用户名和相应的权限,然后再检查程序

28,391

社区成员

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

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