Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • UmbracoNewb 6 posts 26 karma points
    May 20, 2010 @ 14:20
    UmbracoNewb
    0

    Error when saving document. Umbraco version 4.0.3

    When i try to save a node in the content tree i get the following error message:

    Cannot insert the value NULL into column 'id', table 'UmbracoConfetti.dbo.cmsPropertyData'; column does not allow nulls. INSERT fails.
    The statement has been terminated.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'id', table 'UmbracoConfetti.dbo.cmsPropertyData'; column does not allow nulls. INSERT fails.
    The statement has been terminated.


    What to do?

  • Tommy Poulsen 514 posts 708 karma points
    May 20, 2010 @ 14:30
    Tommy Poulsen
    0

    Has the db been moved? The error sounds like the one you get when missing an identity property on the table that sometimes gets lost during db migration.

  • Steen Tøttrup 191 posts 291 karma points c-trib
    May 20, 2010 @ 14:32
    Steen T√łttrup
    0

    Is this done from the Umbraco UI or from some sort of component/user control/etc. ??

     

  • UmbracoNewb 6 posts 26 karma points
    May 20, 2010 @ 14:35
    UmbracoNewb
    0

    Yes the db was moved, and it is done from the Umbraco UI.

  • Tommy Poulsen 514 posts 708 karma points
    May 20, 2010 @ 14:39
    Tommy Poulsen
    0

    then the column 'id' in table 'UmbracoConfetti.dbo.cmsPropertyData
    is missing - thats due to the migration.

    You can add the identity of the column in your favorite db management program - make it similar to the source column.

    If you use Microsoft SQL Server Database Publishing Wizard to do the migration everything normally comes out ok.

    >Tommy

     

  • UmbracoNewb 6 posts 26 karma points
    May 20, 2010 @ 15:02
    UmbracoNewb
    0

    Id row already exsists in the dbo.cmsPropertyData.

    id(int, not null)

  • Tommy Poulsen 514 posts 708 karma points
    May 20, 2010 @ 15:06
    Tommy Poulsen
    0

    yes, but it probably does not have the "identity" property set

  • UmbracoNewb 6 posts 26 karma points
    May 20, 2010 @ 15:59
    UmbracoNewb
    0

    The identity is set to false, but is there a way i can set it to true?

  • Tommy Poulsen 514 posts 708 karma points
    May 20, 2010 @ 17:20
    Tommy Poulsen
    0

    are you using some kind of visual studio to access your db? If so, you can open your table, find the ID column and change the property.

    There's probably also an sql way - whcih I don't know right now

Please Sign in or register to post replies

Write your reply to:

Draft