Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

SQl Error

  Asked By: Abarrane    Date: Feb 24    Category: Asp.net    Views: 910
  

Pls help me I am getting this error in one sql procedure execution.

Server: Msg 217, Level 16, State 1, Procedure updcrdstatus, Line 9

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

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Kiet Jainukul     Answered On: Feb 24

Sounds to me like you have something that is repeating in an endless loop
and SQL server  is stopping it. SQL server has built in safeguards to keep
endless loops and such from bogging down or crashing the server. Nesting is
where you have conditional statements inside conditional statements such as:

IF blah blah blah then
IF blah blah blah then
IF blah blah blah then
else
END IF
else
END IF
else
END IF

In the above example you have nested to 3 levels meaning you have 3
conditional statements all inside each other. It is possible to
accidentially write code that nests indefinitely, causing an infinite loop
of conditional statements. Thus, SQL server has safeguards and will only
allow nesting up to 32 levels before it stops the process and generates the
error you see.

In order to fix this you need to look at the code and analyze your
conditional loop statements to make sure there is not some combination of
factors that will cause it to loop indefinitely.

 
Didn't find what you were looking for? Find more on SQl Error Or get search suggestion and latest updates.




Tagged: