Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Posts
    4

    Unanswered: Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32

    Hi,

    I face this error when i try to run my store procedure.
    The sample of store procedure as following:

    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_NULLS ON
    GO

    CREATE PROCEDURE sp_addUserAccess
    with encryption
    AS
    SET NOCOUNT ON

    DECLARE @COUNTER INT
    SET @COUNTER = 0

    DECLARE @i_compId INT
    BEGIN
    DECLARE C1 SCROLL CURSOR FOR
    SELECT i_compId
    FROM ltd_cms_company WHERE (i_owner = 176 or i_owner = 268) AND ti_recStatus = 1
    END

    OPEN C1
    FETCH ABSOLUTE @COUNTER FROM C1 INTO
    @i_compId

    WHILE @@FETCH_STATUS = 0
    BEGIN
    INSERT INTO ltd_cms_userAccess ( i_loginId, i_groupId, i_compId, ti_updComp, ti_updLog, ti_updAccess, ti_owner, ti_acctMgr, ti_updContact, ti_updEvent )
    VALUES ( 124, 0, @i_compId, 1, 1, 1, 1, 1, 1, 1)

    SET @COUNTER = @COUNTER + 1
    FETCH ABSOLUTE @COUNTER FROM C1 INTO
    @i_compId
    END

    CLOSE C1
    DEALLOCATE C1
    SET NOCOUNT OFF


    anyone can help me identify this error?


    Thanks


    Regards,
    Jojomay

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    What's the syntax for the INSERT trigger on ltd_cms_userAccess table (unless it's a view, then for the underlying tables)?
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •