none
Unable to update historical data on particular sharepoint custom list

    Question

  • SharePoint version : SharePoint wss 3.0 sp2

    Users are not able to update historical data on particular lists.  The update fails “silently” – no error is reported.

    The underlying problem was discovered while running a trace against the sharepoint sql server.  An error number 1150 was raised in proc_UpdateListItem (and ignored) when attempting to run an update. 

    We discovered that after a point in time, the number of rows in AllUserData that represented a version of a list item grew from 3 to 4 (tp_RowOrdinal).  The attempted updates to the historical items that have 3 rows fail.  Below is a snippet from proc_UpdateListItem where the error is occurring:

    WHERE

                tp_ListID =@ListID AND

                tp_ID =@ItemID AND

                (tp_Level = @Level) AND

                tp_RowOrdinal =@RowOrdinal AND

                (@tp_Version IS NULL OR @RowOrdinal > 0 OR

                    tp_Version =@tp_Version)AND

                (@NeedsAuthorRestriction = 0 OR

                    tp_Author =@UserID)

        SET@RowsAffected =@@RowCount

        IF@RowsAffected <>1

        BEGIN

            SET@ReturnCode =87

            IF (@tp_Version ISNOTNULL)AND@Version <>@tp_Version

            BEGIN

                SET@ReturnCode =1150

            END

            GOTOCLEANUP

        END

    What is the recommended way to resolve this?  Should an additional record be added for each version?  This seems risky.  Is there a way to inform sharepoint that historical records have 3 rows, while current records have 4?

    We have been using several tools with sharepoint, including deployment tools, so we are unsure what caused the issue.

    Any help or information would be greatly appreciated. 


    Friday, February 17, 2012 12:25 PM

All replies