错误:超出最大存储过程,函数,触发器或视图嵌套级别(限制32)? [英] error:Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)?

查看:470
本文介绍了错误:超出最大存储过程,函数,触发器或视图嵌套级别(限制32)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的页面正确运行了很多次。但现在出现此错误:



超出最大存储过程,函数,触发器或视图嵌套级别(限制32 )。



i有一个功能正常。



i没有任何存储过程或触发器。



i不知道为什么会发生这种情况!!



My page is run many times correctly.But now this error is appear:

Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).

i have a function in it that works well.

i dont have any stored procedure or trigger.

i dont know why this happenes!!

alter FUNCTION [dbo].[groupPath](@PostGroupID bigint) 
RETURNS nvarchar(100)
AS
BEGIN
declare @parent bigint 	
declare @ReturnPath nvarchar(100)
set @parent=(select PostGroupParentID from tblBase_PostGroup where PostGroupID=@PostGroupID)
if(@parent <>-1)
begin 
set @ReturnPath=(dbo.groupPath(@parent))
set @ReturnPath=@ReturnPath+'  »  '+(Select PostGroupName from tblBase_PostGroup where PostGroupID=@PostGroupID)
end
else
set @ReturnPath=(select PostGroupName from tblBase_PostGroup where PostGroupID=@PostGroupID)
return @ReturnPath
END;

推荐答案

正如错误消息所示,函数的嵌套级别已超过最大限制允许。您将不得不分析您的函数为何如此深层嵌套。有一些很好的讨论这里 [ ^ ]。

如果您仍然无法解决问题,则必须在此处发布代码。
As the error message says, the nesting level of the function has exceeded the maximum limit allowed. You will have to analyse your function why it is so deeply nested. There are some good discussions here[^].
If you are still not able to solve the issue, you will have to post the code here.


错误意味着你要从你的程序中调用一个过程,视图或函数,然后从那个调用另一个过程,等等 32级深度。或者它可以通过proc调用自身递归。



无论哪种方式,你都必须追踪它的来源并改变你的代码函数使嵌套级别不会接近那个深度。没有办法改变最大嵌套级别。



欲了解更多信息,请阅读这个 [ ^ ]



希望它有所帮助:)
The error means you're calling a procedure, view or function from your procedure, and then from that proc calling another, etc 32 levels deep. Or it could be recursive with the proc calling itself.

Either way, you're going to have to track down where that is coming from and change the code of your function so that the nesting level isn't anywhere close to that deep. There's no way to change the maximum nesting level.

For more information Read This[^]

hope it helps :)


User Go keyword between exec procedure and final end
or simply alter only procedure not exec procedure command


这篇关于错误:超出最大存储过程,函数,触发器或视图嵌套级别(限制32)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆